Hi all,
For a design I’m making, I found this css code to make the footer stick to the bottom of the page without covering up content. The “push” div should provide a gap between the last content and the footer div and push it downward if required by the amount of content. The [URL=“http://ryanfait.com/sticky-footer/”]demo provided with the script shows this clearly.
Now, I know I have changed the “wrapper” into “container” and I have used id’s in stead of classes, but I reasoned this should be no problem, right? Nevertheless, my footer keeps sliding over the content part in all browsers when I resize my window to a smaller size. You can see what I mean here.
I tried putting a clear: both within my push div in css, but no luck. When I place something inside this div in my html, it shows up directly onder the content to the right.
This is the relevant part of my css:
*{margin:0;padding:0;}
html, body {
height: 100%;
font-size: 11px;
font-family: Verdana, Tahoma, Helvetica;
color: #768591;
}
div#container {
min-height: 100%;
height: auto !important;
height: 100%;
margin: 0 auto -80px;
width: 940px;
}
div#push {
height: 80px;
}
div#footer {
height: 80px;
background-image: url(gui/footer_back.jpg);
background-repeat: repeat-x;
backgroud-position: top;
}
div#footernav {
width: 940px;
height: 56px;
background-image: url(gui/footer_navback.jpg);
background-repeat: no-repeat;
backgroud-position: top left;
margin: 0 auto;
padding-top: 24px;
}
div#footerlinks {
float: left;
padding-left: 180px;
color: #ffffff;
font-size: 10px;
width: 700px;
}
div#footerlinks a:link, div#footerlinks li a:visited, div#footerlinks li a:active{
text-decoration: none;
color: #ffffff;
}
div#footerlinks a:hover {
text-decoration: underline;
color: #ffffff;
}
div#copyright {
float: left;
padding-left: 20px;
font-size: 10px;
margin-top: 15px;
}
And the html used:
<div id="container">
<div id="top">
<div id="logo"><img src="gui/gui_twiztedlogo.jpg" alt="Welkom bij Twizted Imagebuilding"></div>
<div id="menu"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('home','','gui/menu_home02.jpg',1)"><img src="gui/menu_home01.jpg" alt="startpagina" name="home" width="62" height="32" border="0"></a><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('consultants','','gui/menu_consultants02.jpg',1)"><img src="gui/menu_consultants01.jpg" alt="maak kennis met onze consultants" name="consultants" width="94" height="32" border="0"></a><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('solutions','','gui/menu_solutions02.jpg',1)"><img src="gui/menu_solutions01.jpg" alt="reputatie-oplossingen voor mensen en merken" name="solutions" width="83" height="32" border="0"></a><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('clients','','gui/menu_clients02.jpg',1)"><img src="gui/menu_clients01.jpg" alt="cases en realisaties" name="clients" width="71" height="32" border="0"></a><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('community','','gui/menu_community02.jpg',1)"><img src="gui/menu_community01.jpg" alt="maak deel uit van onze community" name="community" width="95" height="32" border="0"></a><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('contact','','gui/menu_contact02.jpg',1)"><img src="gui/menu_contact01.jpg" alt="neem contact met ons op" name="contact" width="71" height="32" border="0"></a></div>
</div>
<div id="header"><h1 class="header">test</h1></div>
<div id="submenu"><div id="subnav">
<ul>
<li class="title">training & coaching</li>
<li><a href="#">uitstraling & stijl</a></li>
<li><a href="#">personal branding</a></li>
<li><a href="#">lichaamstaal</a></li>
<li><a href="#">presentatie</a></li>
<li><a href="#">eerste indruk</a></li>
<li class="title">consultancy</li>
<li><a href="#">brand strategy</a></li>
<li><a href="#">brand identity design</a></li>
<li><a href="#">marketing consultancy</a></li>
<li><a href="#">online marketing</a></li>
<li><a href="#">personal branding</a></li>
</ul>
</div></div>
<p>Your website content here.</p>
<div id="push"></div>
</div>
<div id="footer">
<div id="footernav">
<div id="footerlinks"><a href="#">myTwizted</a> | <a href="#">reputatieblog</a> | <a href="#">stylekitchen</a> | <a href="#">newsletter</a> | <a href="#">algemene voorwaarden</a> | <a href="#">contacteer ons</a></div>
<div id="copyright">© 2009 Twizted Imagebuilding | Meir 24 - bus 7 | 2000 Antwerpen | 03 206 50 50 | [email]office@twizted.be[/email]</div>
</div>
</div>
Does anyone know where it goes wrong?
Thanks in advance for your assistance.
Stef