Forum Moderators: not2easy

Message Too Old, No Replies

getting content div to stretch 100% in height

at different resolutions

         

stef24

3:36 pm on Nov 17, 2004 (gmt 0)

10+ Year Member



i want my content div to stretch from the top to the bottom of my screen regardless of resolution. right now it fits for 800x600

how do i get it to stretch at higher resolutions? using height:100%; doesnt work. inside my content div i have other divs with width and height specified in px - do these need to be converted to %'s aswell?

whats inside the content div should stay in its place, and the extra space created by stretching the height can be filled with background-color of my content div

anyone know of a x-browser solution?

Lance

4:31 pm on Nov 17, 2004 (gmt 0)

10+ Year Member



Try putting 100% height on your body element as well. That way your content <div> knows what it's supposed to be 100% height of.

body
{
HEIGHT: 100%;
}