PDA

View Full Version : having a divs height adjust to the content within it???



LJackson
Mar 26th, 2010, 02:24 AM
Hi,

i have a page with a wrapper and a left and right column.

now if i dont set a height for these div then they dont appear, how do i get them to appear so that there are as high as the content inside of them?

i have 20 plus pages and currently have 20+ css divs for each of them where as it would be nice to use just 1 set of css for the lot and have then set the the content on the page :)

here is the css containers in question

#entertainment_wrapper{margin:0px auto; width:948px; height:1250px; padding-left:6px; padding-right:6px; background-color:#FFFFFF; font-family:"Trebuchet MS"}
#entertainment_category_left{float:left; width:265px; height:1085px; margin-right:10px; padding-top:5px; background-color:#E9E9E9;}
#entertainment_category_right{float:left; width:670px; height:1085px; padding-top:5px;}

and here is my page (http://www.kernow-connect.com/dvdnew.php)

any ideas how i can get this to work
thanks
Luke

Excavator
Mar 26th, 2010, 03:14 AM
Hello LJackson,
You should look at using Faux Columns (http://nopeople.com/CSS/faux_columns/index.html).

LJackson
Mar 26th, 2010, 03:43 AM
that does look like i am after, will look into it more tomorrow, thanks
Luke

DaiLaughing
Mar 26th, 2010, 08:03 AM
overflow:visible and min-height rather than height?