Forum Moderators: not2easy

Message Too Old, No Replies

DIV issues

footer won't stay at bottom in FireFox

         

faltered

11:35 pm on Mar 1, 2005 (gmt 0)

10+ Year Member



I have a template that I'm using to redesign a page. Basically there's a big container with fixed width centered in the middle of the page. Then inside of it I have a header, content, navigation, and a footer. The footer will NOT stay at the bottom in FireFox. Everything looks fine in IE.

Wondering if anyone can see something here that I'm overlooking? Thanks.

Here is my CSS:
***************
body {
padding:0px;
background-color: #000000;
}

#bigcontainer {
margin-top:100px;
margin-bottom:100px;
border: 1px solid #CCCCCC;
width: 650px;
left: 50%;
position: absolute;
margin-left: -325px;
background-color: #FFFFFF;
}

#header {
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #CCCCCC;
background-image: url(../Photos/topbanner.jpg);
height: 100px;
background-repeat: no-repeat;
}

#nav {
margin-left: 15px;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 9pt;
color: #999999;
width: 100px;
height: 100px;
float: right;
margin-top: 25px;
}

#content {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 9pt;
color: #999999;
padding-left: 35px;
padding-right: 35px;
padding-bottom: 50px;
float: left;
width: 460px;
margin-top: 25px;
border-right-width: 1px;
border-right-style: solid;
border-right-color: #CCCCCC;
padding-top: 20px;
line-height: 14pt;
}

#footer {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 7.5pt;
color: #999999;
border-top-width: 1px;
border-top-style: solid;
border-top-color: #CCCCCC;
text-align: center;
width: 650px;
margin: 0px;
bottom: 0px;
line-height: 18px;
}
a:link {
color: #000000;
text-decoration: none;
}
a:visited {
color: #000000;
text-decoration: none;
}
a:hover {
color: #000000;
text-decoration: none;
}
a:active {
color: #000000;
text-decoration: none;
}
h1 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12pt;
color: #999999;
}

**************
Here is my html:
*************
<body>
<div id="bigcontainer">
<div id="header"></div>
<div id="nav"><table>Navigation here</table></div>
<div id="content">
<p>Content here.</p>
<p>And more content</p>
<p>And yet some more content will go in this area here. And it may just be enough to make it wrap into a second line.</p></div>
<div id="footer">Site designed by <a href="http://example.com">Example.com</a>. Last update 3.1.05.</div>
</div>
</body>

Setek

6:56 am on Mar 2, 2005 (gmt 0)

10+ Year Member



If you to use the bottom: property, you need to set your div#footer to position: absolute;

Keep in mind the fact that if any div crosses to the bottom (say, for people on 800*600) it -will- overlap your footer :D

faltered

4:00 pm on Mar 2, 2005 (gmt 0)

10+ Year Member



Thank you. I will try that and see what happens.

faltered

3:00 pm on Mar 4, 2005 (gmt 0)

10+ Year Member



I tried setting the footer to position: absolute, but that only took it completely out of flow with everything else on the page.

I did manage to solve the problem, though. I added a clearing div to clear both the content and navigation, so now the footer stays at the bottom. At least I'll remember this problem for next time!