Forum Moderators: not2easy

Message Too Old, No Replies

Hmmm, extra border?

         

bobnew32

12:22 pm on Jan 24, 2005 (gmt 0)

10+ Year Member



I keep using this css, but its adding space surrounding the colors between the outside lines. How do I get that space to go away, i've tried everything!

CSS:

#surroundedBox {
border-right: solid #000 1px;
border-left: solid #000 1px;
border-bottom: solid #000 1px;
border-top: solid #000 1px;
font-size: 10px;
margin: 0px;
padding: 0px;
}
.blue {
background-color: #06c;
color: #fff;
font-size: 11px;
}

In Page:

<div id="surroundedBox">
<div class="blue">Some Text</div>
Some More Text
</div>

BonRouge

3:24 pm on Jan 24, 2005 (gmt 0)

10+ Year Member



Hmmm... Not sure if this is the answer you're looking for (probably not) but you could try putting the properties in the right order ie.

border-right: 1px solid #000;

as opposed to


border-right: solid #000 1px;

I hope this helps.

choster

3:35 pm on Jan 24, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It renders as expected in IE and FF on my machine. There is a small gap above and below the text because each font will reserve space for character ascenders and descenders (i.e. the parts that "stick out" of letters like bdpq) as well as leading, the spacing between lines of text. Try fiddling with the
line-height
.

bobnew32

7:53 pm on Jan 24, 2005 (gmt 0)

10+ Year Member



[stickypapers.com ]

Thats a picture of whats occuring; on all sides between the blue block and its border is white space occuring. I want that gone :(

valder

8:32 pm on Jan 24, 2005 (gmt 0)

10+ Year Member



I'd suggest that it's the <div class="blue"> that's your problem. Try setting
margin: 0;
for class blue.