body height = non!!!


#1

cant i just have my height to be expanding by itself? i dont want to specify height for my body!!! as in; #bodi {height:500px; } i dont want to do that!!! i want the body to expand with the level of info. any way out?


#2

Don’t specify height attribute then


#3

#whatever {
height: auto;
}


#4

{
height: auto;
}


#5

The problem with auto height is that you might get frustrated using float and same also go for none.
If you can use javascript, you can get the height of the body onload and on any event related to height it should adjust based on screenHeight


#6

@OLSylas: if i did not specify height, it will not expand now, abi? but i need the height to open with the level of content, i dont want to specify height at all.
@adeleke and @ridwansanusi: i have not try that option b4, maybe i’ll try that.
@acefx: i dont know how to write javascript yet!!!

or could it be my css reset that is affecting it? am just curious!!!


#7

i think i found a solution, although am still working on the site, but i noticed that when i used margins, the vertical scroll bar came out, so, i have use less of margin and more of padding. i’ll share the site when am done. thanks for ur response. I remember that i didn’t specify height too.


#8

There is something you need to understand about margin…let say u have this div structure:

< div >
< div id=“am600px”>< /div>
< /div>

If you set the with of the element with ID am600px to 600px and add margin:10px 20px; in the style, it will occupy 600 + 40 === 600(as width) and 20px on d left and 20px on d right and that equals to 640px space.