Click to See Complete Forum and Search --> : css height with %


keko2005
11-16-2006, 02:57 PM
hey guys. how come when i use height:100% for a div id it doesnt work. when i use width:100%; that works proper. what am i doin wrong?

here the css code;

body{
margin:0px;
background-color:#f65a1d;
}

div#main_container{
width:80%;
height:100%;
background-color:#FFFFFF;
}

keko2005
11-16-2006, 03:05 PM
got it. was the doc type that was messing it up

Kravvitz
11-16-2006, 05:51 PM
It's because width and height work differently in CSS.

What doctype are you using now?