...

View Full Version : wrap height not adjusting to the height of the content



tktest
03-17-2011, 03:03 PM
Hi All,

I am in the process of designing a website for a client and i am having some issues with my wrap div height.

I have a <div id="wrap"> in all my pages with this CSS

#wrap {
width:943px;
height:auto;
margin:0 auto;
background:#FFFFFF;
}

But for some reason it isnt auto adjusting to the height of the content.

This wouldnt usually bother me but i have a white background on the wrap div and i need this to auto adjust to the height of the content so that the website has a white background.

At the moment i am forcing each pages wrap height to accomadate the content but really i would like it to auto adjust.

please can someone take a look here http://bit.ly/hxLdsy and see how i can fix this.

thanks

Craig

abduraooft
03-17-2011, 03:27 PM
Add overflow:auto; to #wrap to clear the floats, read http://www.quirksmode.org/css/clearing.html

tktest
03-17-2011, 04:38 PM
Ah nice one mate thats been doing my head in.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum