I'm stuck and can't find a solution, so hopefully ya'll can help me out.
I can't get my footer to stay on the bottom of the page. Usually I don't have this problem, I dunno why I am now. I tried the absolute positioning with bottom:0; however that doesn't work. It works initially, but once the page stretches it doesn't go with it, just stays there.
style.css
Code:
/* kill defaults */
html, body, ul, dl, li, h1, h2, h3, h4, img {
margin: 0;
padding: 0;
}
ul {
list-style: none;
}
img {
border: 0;
}
/* ============= */
html {
height:100%;
}
body {
background-color:#1c261b;
height:100%;
}
.bg {
background-image:url(images/bg.gif);
background-repeat:repeat-y;
margin:auto auto;
width:1120px;
min-height:100%;
}
.container {
margin:auto auto;
width:979px;
min-height:100%;
margin-left:71px;
}
.banner {
background:url(images/banner.gif) no-repeat;
width:979px;
height:180px;
margin:auto auto;
}
.footer {
background:url(images/footer.gif) no-repeat;
width:979px;
height:68px;
position:absolute;
bottom:0px;
}
.nav {
background:url(images/navbg.gif) repeat-x;
width:100%;
height:29px;
}
.clear { clear:left; }
.leftColumn {
width:298px;
float:left;
border:1px solid #000;
border-left:none;
}
.middleColumn {
width:379px;
float:left;
border:1px solid #000;
}
.rightColumn {
width:298px;
float:right;
border:1px solid #000;
border-right:none;
}
.leftColumnSmall {
width:228px;
float:left;
border:1px solid #000;
border-left:none;
}
.middleColumnSmall {
width:449px;
float:left;
border:1px solid #000;
}
.headerFeaturedMatch {
background:url(images/header_featuredmatch.gif) no-repeat;
width:298px;
height:23px;
}
.headerRecentNews {
background:url(images/header_recentnews.gif) no-repeat;
width:379px;
height:23px;
}
.headerFidelityTeams {
background:url(images/header_fidelityteams.gif) no-repeat;
width:298px;
height:23px;
}
.headerMatchResults {
background:url(images/header_matchresults.gif) no-repeat;
width:228px;
height:23px;
}
.headerRecentNewsLarge {
background:url(images/header_recentnews_large.gif) no-repeat;
width:449px;
height:23px;
}
.result {
background:url(images/_result.gif) no-repeat;
width:298px;
height:153px;
border:1px solid #000;
border-left:none;
border-right:none;
}
.news {
background:url(images/_news.gif) no-repeat;
width:379px;
height:153px;
border:1px solid #000;
border-left:none;
border-right:none;
}
.teams {
background:url(images/_teams.gif) no-repeat;
width:298px;
height:358px;
border:1px solid #000;
border-left:none;
border-right:none;
}
.results {
background:url(images/_results.gif) no-repeat;
width:228px;
height:174px;
border:1px solid #000;
border-left:none;
border-right:none;
}
.post {
background:url(images/_post.gif) no-repeat;
width:449px;
height:287px;
border-left:none;
border-right:none;
}
index.php
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title></title>
<link rel="stylesheet" type="text/css" href="<?php echo rootpath; ?>style.css" />
</head>
<body>
<div class="bg">
<div class="container">
<div class="banner"></div>
<div class="nav"></div>
<div class="leftColumn">
<div class="headerFeaturedMatch"></div>
<div class="result"></div>
</div>
<div class="middleColumn">
<div class="headerRecentNews"></div>
<div class="news"></div>
</div>
<div class="rightColumn">
<div class="headerFidelityTeams"></div>
<div class="teams"></div>
</div>
<div class="clear"></div>
<div class="leftColumnSmall">
<div class="headerMatchResults"></div>
<div class="results"></div>
</div>
<?php
include ($page.'.php');
?>
<div style="clear:both;"></div>
<div class="footer"></div>
</div>
</div>
</body>
</html>
Please excuse the very messy CSS, I was just testing stuff that would normally be dynamic in my template and will later clean it up.
This is what happens when the page stretches:
< huge image removed so we can read the posts>
Let me know if you see anything out of place. I need this done ASAP.
Last edited by chrishirst; 12-22-2008 at 03:49 PM..
|