CSS height 100% problem in FF
- Started
- Last post
- 12 Responses
- sschmalz
How do you get your page height to be 100% regardles of content length in FF. It works in IE with height on html and body set to 100%, but my pages only stretch as long as the content in FF.
- kodap0
html{
height:100%;
}
body{
height:100%;
margin:0;
}
- sschmalz0
That helped to a point. My problem now is that along with the body and html set to 100%, I also have the enitire page within a wrapper div to center and give a page background. This is also set to 100%.
The page will stretch to the bottom of the browser window as long as the content is shorter than that. As soon as the content grows past the bottom of the browser window, the page becomes cut off and doesn't stretch. However taking the 100% height attribute off of the wrapper div will then allow tha page to stretch again with longer content.
But as soon as the content shrinks again, the page doesn't stretch to the bottom until I change the wrapper div back to 100%
Any thoughts?
- stevegee0
put the background on the body, not on a wrapper div, also put
body {align: center;
background...}
then in your main div, you can realigin everything left, ro whatever.
no need for wrapper div's in most cases.
- stevegee0
oh yea, and height isn't supported so much, so try not to use it.
- UndoUndo0
if you use the wrapper div set display:table; and then the content won't leak through the bottom and it will take the height of the content
- blaw0
hey! good aftnoon, sschmaltz.
- sschmalz0
Thanks so much guys, it's working great now!
- groundst0
It always seems to help if I take the
out all together. Try it... I bet it works.
- groundst0
Try taking the tag out that starts with
"!DOCTYPE html PUBLIC..."
For some reason it always helps.
- sschmalz0
grrr.......now it seems as though in IE7 that the display:table attribute isn't working.....forcing the content to leak out of the bottom.......any fix for this?
- rafalski0
Try taking the tag out that starts with
"!DOCTYPE html PUBLIC..."
For some reason it always helps.
groundst
(Jan 19 06, 13:22)--
it's not funny that quirksmode was the most developer friendly one and those nerdy css fathers managed to throw it all away.I want vertical alignment back!!!
- jakeyj0
DO NOT DELETE YOUR DOCTYPE!