I suppose the summary pretty much says what my issue is. I would provide a link but this particular page only works if you have login credentials, so I included a screen shot. You can see the location of the footer is way up high but the bottom of it should hug the window. The white content is split into two divs, one that includes the text menu and the rounded white corners, and the one under it (the one I can’t get to expand to the bottom of the window) that holds most of the content. The footer uses a negative margin to push on top of the white content div above it. This white-content div also has a padding-bottom value to match the negative margin. the body background is the gray you see at the bottom under the green (top-stripe) div. So the basic html structure:
<body>
<div id="top-stripe">
<!-- holds green background with glows -->
<div id="top-content">
<!-- has a set width to contain all the content on the stripe -->
</div>
</div>
<div id="white-top">
</div>
<div id="white-content">
</div>
<div id="footer">
</div>
</body>
and my css file is pretty full so i’ll just include the css that applies to the divs mentioned above:
#top-stripe {
background: rgb(69,112,43) url(images/top_glow.png) no-repeat top center;
margin: 0 auto;
width: 100%;
height: 479px;
position: relative;
}
#top-content {
position: relative;
margin: 0 auto;
width: 1024px;
height: 100%;
}
#white-top {
font-family: Georgia, serif;
margin: -90px auto 0 auto; /* overridden margin-top: -320px for this particular page */
background: transparent url(images/white-rect-top.png) no-repeat top center;
width: 897px;
height: 139px;
padding-top: 1px;
position: relative;
}
#white-content {
font-family: Georgia, serif;
position: relative;
background: transparent url(images/white-rect-tile.png) repeat-y top center;
margin: 0 auto;
margin-top: -1px;
width: 897px;
/*min-height: 100px;*/
height: 100%; /* above didn't work so i tried this...didn't work */
padding-bottom: 90px; /*offset footer overlap*/
overflow: hidden; /* necessary for floated content to push bottom edge of element down */
}
#footer {
background-color: rgb(51,51,51);
height: 88px;
width: 825px;
margin: -88px auto 0 auto; /*necessary to get shadows on the sides of the footer; overlap white-content*/
position: relative;
clear: both;
}
So height:100% doesn’t work. Is this because of the negative margin? I thought it makes the height fill whatever height of the containing object is and technically the body element is the direct parent element of #white-content. Maybe it’s because there’s a different element above it? Ok I’ll stop guessing…can anyone help me out? Btw, this is FF 3.5.7. I suppose I’ll have to worry about the other browsers later. It helps using a reset.css for all my pages.