I have a div
with the class .app
, which has the following css rules:
.app {
width: 960px;
margin: 40px auto 0 auto;
background: #fff;
min-height: 100%;
z-index: 1;
}
The min-height
was working as expected, getting the app div to fill the screen even if it was empty - this is because the content is loaded via ajax and I want the div to reach to the bottom of the screen even before the content is loaded.
However, I'd previously forgotten to add <!DOCTYPE html>
to my document, and now that that's corrected, the height rule no longer works. The doctype
has to be there, both because it's required and to solve a jQuery issue I was having.
Why is the doctype
messing with my css? Or, possibly more to the point, why was it working beforehand?