tags:

views:

45

answers:

2

Does min-height not work on body/html?

body, html
{
    min-height:100%;
}

Accomplishes absolutely nothing (firebug reports the body,html tags height does not change at all)

+1  A: 

First, declare a doctype so you're in standards if you haven't already.

Now, the body can only be as high as the containing html, so you need to set HTML tag to 100% height and body to min-height 100%. This works for me on Firefox.

Moses
Awesome that worked, a follow up question: I have now set body to be min-height: 100%. Now I have another div inside body, and I want that to also be min-height:100%;, I did that but it isn't working.
Razor Storm
I'm honestly not sure about the best way to accomplish that in a cross-browser compliant way.
Moses
A: 

Not all browsers like min-height, try something like this to catch all browsers.

  min-height:100%;
  height:auto !important;
  height:100%;
Zachary