View Full Version : CSS Border not showing

09-15-2009, 07:15 PM
for reason the yellow border on my wrapper div is not extending all the way around my wrapper div. if you look very closely you can see it outside the very top left corner and top right corner of my banner. it's no more than a pixel or two in height, but it should run all the way down to and around the footer to emcompass everything: http://www.21centuryinc.com/new_index.htm.

any idea what's wrong here? thanks in advance!

#wrapper {
margin-right: auto;
margin-left: auto;
padding: 0px 1px 1px;
margin-top: 0px;
margin-bottom: 0px;
width: 904px;
background-color: #00FF00;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
border-right-color: #FFFF00;
border-bottom-color: #FFFF00;
border-left-color: #FFFF00;
height: auto;

09-15-2009, 07:32 PM

border:1px solid #ffff00; border-top-width:0px;

09-15-2009, 08:41 PM
All the items within #wrapper are floated - which takes them out of the normal flow of the document, and hence #wrapper doesn't extend to include them.

To fix, apply overflow:auto to #wrapper - which effectively clear the floats at the end of #wrapper and hence the border will extend as you want.

09-15-2009, 08:56 PM
thanks but that did not seem to work. any other ideas?

09-15-2009, 09:09 PM
Worked for me with Firebug - have you posted your amended code?

EDIT: Or is your post in response to sehana's suggestion?

09-15-2009, 10:44 PM
sb65, i missed your suggesting when attempting sehana's change. it works now. thanks to both of you!!! :thumbsup: