July 6, 201115 yr Hi, I'm developing a site which has a footer that sits on top of content, therefore I have applied a negative margin to the footer. Unfortunately that's left me with an ugly big space underneath my footer: http://sunseed.blendagency.co.uk/template.html Any idea how I get rid of it so that the footer always sits at the bottom of the browser? Any help will be appreciated. HTML is: <!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"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <link href="master.css" rel="stylesheet" type="text/css" /> <script src="js/cufon-yui.js" type="text/javascript"></script> <script src="js/annifont.js" type="text/javascript"></script> <script src="js/cufon-control.js" type="text/javascript"></script> <!--[if lt IE 9]> <script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js"></script> <![endif]--> </head> <body> <div id="templateContainer"> <div id="headerContainer"> <div id="headerTop"> <div id="headerContact"> <div id="login"><a href="#">Wholesale log in</a></div><div id="tel">Tel: 01884 821926</div><div id="email">email: <a href="mailto:sales@sunseedorganics.co.uk">sales@sunseedorganics.co.uk</a></div> </div> </div> <div id="bnrContainer"><img src="images/bnr-holder-trans.png" width="1057" height="332" /></div> </div> <div id="bodyContainer"> <div id="rightContainer"> <h1>Hello... Welcome to Sunseed Organics</h1> </div> <div id="leftContainer"> <div id="navTop"></div> <div id="navBg"> </div> <div id="navBase"></div> <div id="sign"><img src="images/sign-trans.png" alt="Call Sunseed Organics on 01884 821926" width="201" height="256" /></div> </div> </div> </div> <div id="footerContainer"></div> </body> </html> CSS is: @charset "utf-8"; /* CSS Document */ body { margin:0 0 0 0; background-color:#D3E9F3; background-image:url(images/body-bg.jpg); background-repeat:no-repeat; background-attachment:fixed; background-position:top center; } H1 { font-size:26px; margin:0 0 0 0; } a:link, a:visited { text-decoration:none; } a:hover { text-decoration:none; } #templateContainer { width:1057px; margin:0 auto 0 auto; } #headerContainer { float:left; width:1057px; display:inline; } #headerTop { float:left; width:1057px; background-image:url(images/hdr-top-bg-trans.png); background-repeat:no-repeat; display:inline; } #headerContact { float:right; width:420px; display:inline; margin:0 40px 0 0; text-align:right; height: 134px; } #login { height:44px; width:199px; background-image:url(images/login-bg-trans.png); background-repeat:no-repeat; margin:0 0 18px 221px; font-size:14px; text-align:center; padding:20px 0 0 0; } #tel { font-size:20px; margin:0 0 10px 0; } #email { font-size:18px; } #bnrContainer { float:left; width:1057px; height:332px; display:inline; margin:0; } #bodyContainer { width:1018px; float:left; background-image:url(images/body-cont-bg-trans.png); background-repeat:repeat-y; margin:0; display:inline; } #rightContainer { width:700px; float:right; background-color:#FF0; } #leftContainer { width:233px; float:left; } #navTop { width:184px; height:21px; background-image:url(images/nav-top-trans.png); background-repeat:no-repeat; margin:14px 0 0 49px; } #navBg { width:184px; background-image:url(images/nav-bg-trans.png); background-repeat:repeat-y; margin:0 0 0 49px; } #navBase { width:184px; height:23px; background-image:url(images/nav-base-trans.png); background-repeat:no-repeat; margin:0 0 10px 49px; } #sign { float:left; width:201px; height:256px; } #footerContainer { float:left; width:100%; height:142px; background-image:url(images/footer-bg-trans.png); background-repeat:repeat-x; margin:-44px 0 0 0; }
Create an account or sign in to comment