CSS - 4 Column 100% Height - Footer Won't Clear
I seem to be having a bit of a problem with a layout I am attempting...here is the problem...
First of all, this is a 4 column layout with an absolutely positioned header. The 4 columns use floats for positioning as I am trying to keep a natural code flow. The 4 columns are intended to expand and contract with the page's width, and the heights should be 100%. The content of the page flows below the fold of the page on nearly every page. My problem is with the 100% height. In Firefox the footer that I am using to clear the floats is not clearing them, but rather resting below the floats. Does anyone have a good reference for using floats with 100% height that flow below the fold of the page? If someone wants to take a look at an example, you should message me as I can't post the development site publicly. Similar TutorialsEvery time I run the code below my copyright always winds up at the top of the page. If I remove the button div and place normal html in the code the foot works the way I want. I just seem to get messed up with the divs. Any help will be appreciated Andy #foot { clear: both; color: #000; } #foot p { margin: 4px; text-align: center; } #button { position: absolute; padding: 0px; top: 40px; left: 150px; width: 5%; } <html> <head> <title></title> <link href="include/styles.css" rel="stylesheet" type="text/css" media="all"> </head> <body> <div id="button"> <img src="images/button.bmp"> </div> <div id="foot"> <p>Copyright 2007 </p> </div> </body> </html> Hey everyone, I am working on a design for a friend. and I got it almost done, but for some reason, the footer does not display below the page. In no browser. Here is my code: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>BlackNine</title> <script type="text/JavaScript" src="rounded_corners_lite.inc.js"></script> <style type="text/css"> body { background-color: #4D4D4D; color: #FFFFFF; font-family: verdana,tahoma,san-serif,arial; font-size: 13px; margin: 0; padding: 0; } a img { border: 0; } a, a:link, a:visited, a:hover, a:active { color: #ff9600; text-decoration: underline; } a:hover { color: #000000; } li { background-image:url(li.jpg); background-repeat:no-repeat; background-position:left; list-style-type: none; padding-left: 18px; } #header { width: 100%; } #header h1 { color: #ff9600; font-size: 25px; padding-top: 5px; } #header h2 { position: absolute; top: 0; padding-left: 55px; color: #CCCCCC; font-size: 13px; } #main { border-top: 5px solid #0042ff; border-bottom: 5px solid #0042ff; position: absolute; background-color: #FFFFFF; height: auto; margin: 0; width: 98%; color: #000000; padding-right: 2%; } #main h1 { color: #ff9600; font-size: 19px; } #main p { text-indent: 55px; } #rightCol { float: right; width: 20%; position: absolute; right: 0; height: 100%; border-left: 1px dotted #ff9600; } #leftCol { float: left; width: 75%; padding: 2%; } #footer { text-align: center; clear: both; } </style> </head> <body> <div id="header"> <h2>I am so fly</h2> <h1>BlackNine</h1> </div> <div id="main"> <div id="rightCol"> <ul> <li><a href="">asdf</a></li> <li><a href="">asdf</a></li> <li><a href="">asdf</a></li> <li><a href="">asdf</a></li> <li><a href="">asdf</a></li> <li><a href="">asdf</a></li> </ul> </div> <div id="leftCol"> sdfgfgf fsadfsdfsdfjasdklfjsadfksdjf sdfgfgf fsadfsdfsdfjasdklfjsadfksdjf sdfgfgf fsadfsdfsdfjasdklfjsadfksdjf sdfgfgf fsadfsdfsdfjasdklfjsadfksdjf sdfgfgf fsadfsdfsdfjasdklfjsadfksdjf sdfgfgf fsadfsdfsdfjasdklfjsadfksdjf sdfgfgf fsadfsdfsdfjasdklfjsadfksdjf sdfgfgf fsadfsdfsdfjasdklfjsadfksdjf sdfgfgf fsadfsdfsdfjasdklfjsadfksdjf sdfgfgf fsadfsdfsdfjasdklfjsadfksdjf sdfgfgf fsadfsdfsdfjasdklfjsadfksdjf sdfgfgf fsadfsdfsdfjasdklfjsadfksdjf sdfgfgf fsadfsdfsdfjasdklfjsadfksdjf sdfgfgf fsadfsdfsdfjasdklfjsadfksdjf sdfgfgf fsadfsdfsdfjasdklfjsadfksdjf sdfgfgf fsadfsdfsdfjasdklfjsadfksdjf sdfgfgf fsadfsdfsdfjasdklfjsadfksdjf sdfgfgf fsadfsdfsdfjasdklfjsadfksdjf sdfgfgf fsadfsdfsdfjasdklfjsadfksdjf sdfgfgf fsadfsdfsdfjasdklfjsadfksdjf sdfgfgf fsadfsdfsdfjasdklfjsadfksdjf sdfgfgf fsadfsdfsdfjasdklfjsadfksdjf sdfgfgf fsadfsdfsdfjasdklfjsadfksdjf sdfgfgf fsadfsdfsdfjasdklfjsadfksdjf sdfgfgf fsadfsdfsdfjasdklfjsadfksdjf sdfgfgf fsadfsdfsdfjasdklfjsadfksdjf </div> </div> <div id="footer"> asdfsafjsdkf sdafkljsdfk lsdlkfjsd afkljsdfsdklfjsdf asdfksdjf </div> </body> </html> Here is what it looks like. Any suggestions? www.asticafe.com Can anyone tell me why the right column is clearing the left images? It only happens in IE, not modern browsers like Firefox or Safari. What's causing it and how can I fix it? I've tried playing around with "clear:none" and "float:right" properties for the right column, but it just makes the problem worse. I have a pretty typical three column layout with col1 floating left, col2 in the middle and col3 floating right. The HTML calls the divs in order of col1,col3,col2 and everything generally works fine with the exception of using a div in the middle column (col2) with a style that has clear:both in it. The clear:both clears all items in the sidebar columns and not just in the middle column (which is what I want). The problem can be seen at the below URLs. wwwDOTjessiekpowellDOTcom/2009/08/kristin-cavallari-filming-on-malibu-beach-for-the-hills/ and wwwDOTjessiekpowellDOTcom/2009/10/alessandra-ambrosio-bikini-photo-shoot/ As you will see the second set of images from the gallery is displayed after a huge gap of white space after it has cleared the last div in the right sidebar. What I want is to just clear the first row of images in the middle column. This does not just affect images but anything with a div style=clear:both Any suggestions will be appreciated as I've exhausted my skills on this one. hi all, right have got a problem which has been bugging me for days now. i have 4 columns in a row (inside a wapper div)which all will have different content image, text other divs/classes etc. now one of these columns will be quite fluid as it will have different text on each page meaning it will be quite long on some pages not on others. the problem i am getting is in the good browsers firefox etc its ok in IE6+. the wapper does'nt seem to see the divs in the content meaning it does not get filled, meaning that the footer flys to the top and not where it should be, i dont have a live version but heres the code: mainly thanks Dan <!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> <style type="text/css"> <!-- #con { width:940px; height:400px; background-color:#00FFFF; } #wapper { width:940px; background-color:#006666; } #box { width:940px; background-color:#000033; height:40px; } #menu-pronuptia { width:185px; background-color:#6633CC; float:left; display:inline; } #menu-pronuptia1 { width:185px; background-color:#009900; display:inline; float:left; } #menu-pronuptia2 { width:385px; background-color:#0033CC; display:inline; float:left; clear:inherit; } #menu-pronuptia3 { width:185px; background-color:#CCCC33; display:inline; float:left; } --> </style> </head> <body> <div id="wapper"> <div id="menu-pronuptia"> <p>test</p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> </div> <div id="menu-pronuptia1"> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> </div> <div id="menu-pronuptia2"> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> </div> <div id="menu-pronuptia3"> <p> </p> <p> </p> <p> </p> <p> </p> </div> </div> <div id="box"> <p><br /> </div> </body> </html> Hello Just recently I had an idea for a page I wanted to make, the design is basically a 3-column layout with no traditional header or footer, the height of all three columns should run the length of the window/page height the left and rightmost column would have a fixed width or a width in em, the center column width should fill the space in between. If the content is short all columns should extend to the height of the page window, but if the content in any of the columns is longer than the window height they should all extend to reach the bottom of the page and accommodate the content length In my first attempt things didn't go so well, results varied wildly across browsers so I decided to start from scratch bit by bit Bellow is the point at which I reach consistent but undesired behaviour, I have validated and tested the code in Firefox 3/Pale Moon, Internet Explorer 8, Chromium 9, and Opera 11 I would like the end result to work in the above browsers as well as IE7 if possible I should point out now that im not interested in using faux-columns, the layout should not require images, I also wish to have absolute-positioned elements in the columns some time later Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Three Columns</title> <style type="text/css"> *, html, body { margin: 0; padding: 0; font-size: 100%; } html, body { width: 100%; height: 100%; } #maincontainer { position: relative; height: 100%; background: #eee; } #left { position: absolute; top: 0px; left: 0px; width: 200px; background: #fbb; height: 100%; } #mid { position: relative; margin: 0 200px 0 200px; background: #efe; height: 100%; } #right { position: absolute; top: 0px; right: 0px; width: 200px; background: #bbf; height: 100%; } </style> </head> <body> <div id="maincontainer"> <div id="left"> left start<br /> left<br /> left<br /> left<br /> left<br /> left<br /> left<br /> left<br /> left<br /> left<br /> left<br /> left<br /> left<br /> left<br /> left end<br /> </div> <div id="mid"> mid start<br /> mid<br /> mid<br /> mid<br /> mid<br /> mid<br /> mid end<br /> </div> <div id="right"> right start<br /> right<br /> right<br /> right<br /> right<br /> right<br /> right<br /> right<br /> right<br /> right<br /> right<br /> right<br /> right<br /> right<br /> right<br /> right<br /> right<br /> right<br /> right<br /> right<br /> right<br /> right<br /> right end<br /> </div> </div> </body> </html> In the above example it works as long as the content within the columns is shorter than the window height, but if you re-size the window so that the text in the right or left column goes beyond the page, and then scroll to the bottom, the columns do not extend to the bottom of the page so there is a large gap where the content overflows beyond the column What I would like to do from this point is make the columns extend to the bottom of the page when this happens, but I'm not sure how best to proceed I also have a version of the above code which uses floated left and right columns instead of absolute positioned ones, would it be better to work from that? or does it not really matter Thanks in advance can i make my left column, the same height as my right column? or infact, if the left is taller than the right, the right extends to it and if the right is taller than the left the left extends to it? is this possible, cheers heres my css: left column, is #leftNav and the right column is #contentMain PHP Code: #content { margin:0px auto; padding: 0; width: 760px; } #contentMain { padding: 0; margin: 0; float: right; width: 632px; } #leftNav { color: #000; float: left; margin: 0; padding: 0; width: 128px; } Hey guys, since the last time I posted, I've made a lot of progress with learning CSS but I'm still having one issue. When I resize my window or I use a smaller resolution, my footer bleeds out into the third column. It doesn't do this with the header, navbar, or text box and I don't understand why. Any help? I'm having two issues with IE on my site. 1. IE is displaying the body background image (bg.jpg) throughout the entire page. 2. IE is pushing the sidebar way down. Neither of these issues exist in Firefox. I think the second issue may have something to do with the first issue. Here is the relevant code. Code: html,body * { padding:0px; margin:0px; } body { background-image:url(images/bg.jpg); background-repeat:repeat-x; background-color:#fb7d21; margin:0 auto; height:100%; } div#container { width:792px; margin:0 auto; background-image:url(images/filler.jpg); background-repeat:repeat-y; } div#header { width:792px; height:109px; background-image:url(images/header.jpg); background-repeat:no-repeat; margin-top:20px; } div#content { float:left; width:570px; padding:0 0 0 10px; margin-top:-40px; } div#sidebar { float:right; width:212px; margin-top:-95px; } div#footer { clear:both; width:792px; height:84px; background-image:url(images/footer.jpg); background-repeat:no-repeat; } You can see the issues on my site here. Any idea what is causing this? Thanks in advance. I would love for it to look like the footer on the mint.com site. Do you know how to accomplish this? Hello! I am in need of some help with my css. I know, I am a total newbie but need some help with getting the css working properly. It seems that some parts work for IE and other parts work for Firefox. It seems like my left bar shows differently in IE and Firefox. Furthermore I have checked with IE on Mac and the main body doesn't show correctly either. It is displayed too short, doesn't fill the box. If anyone please could take a look at the code and see if they can help me I would appreciate it. Please anyone help me. You can see the page at: http://www.galakse.no/test/index.php/tscm/news The css is located he http://www.galakse.no/test/design/tscm/stylesheets/tscm.css Any and all help is very much appreciated! Thank you! I've spent the last two days struggling, trying to get the footer to stay at the bottom of the window and the two right most columns in my layout to stretch to the footer. I've search this site thorough for answers, and yes, there were many of them. But still, after implementing everyone I came across, I can't get the layout to do the above criteria in both IE and Firefox. HTML 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"> <head> <title>Mall</title> <link href="css/template.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="wrapper"> <div id="main"> <div id="header"> <div id="ecommerce"> <div id="logo"><img src="images/logo.jpg" width="188" height="18" alt="Mall" title="Mall" border="0" /></div> <div id="text"><a href=""><img src="images/cart.gif" width="16" height="16" alt="Master Basket" title="Master Basket" border="0" /> Basket</a> | <a href="">Register</a> | <a href="">Login</a></div> </div> <div id="content"> <div id="searchform"> <form> <fieldset> <legend>Search Shopping Mall</legend> <div id="search_btn"><input type="submit" value="Search" class="button" /></div> <div id="search_type"> <select> <option>Products</option> <option selected="selected">Stores</option> </select> </div> <div id="search_input"><input type="text" name="query" id="query" value="" size="22" maxlength="200" /></div> </fieldset> </form> </div> <!-- end searchform --> </div> <!-- end content --> </div> <!-- end header --> <div id="mall"> <!-- top navigation --> <div id="topnav"> <div id="nav-container"> <ul id="nav"> <li id="nav-home"><a href="index.html" accesskey="1">Home</a></li> <li id="nav-browse"><a href="browse.html" accesskey="2">Browse Mall</a></li> <li id="nav-getastore"><a href="getastore.html" accesskey="3">Get A Store</a></li> <li id="nav-featstore"><a href="featstore.html" accesskey="4">Featured Store</a></li> <li id="nav-featitem"><a href="featitem.html" accesskey="5">Featured Item</a></li> <li id="nav-aboutus"><a href="aboutus.html" accesskey="6">About Us</a></li> <li id="nav-contactus"><a href="contactus.html" accesskey="7">Contact Us</a></li> <li id="nav-help"><a href="help.html" accesskey="8">Help</a></li> </ul> </div> </div> <!--<div id="topnav"> <div id="menu"><a href="index.html">Home</a><span id="sp"><img src="images/navsp.gif" align="absmiddle" /></span><a href="browse.php">Browse Mall</a><span id="sp"><img src="images/navsp.gif" align="absmiddle" /></span><a href="">Get A Store</a><span id="sp"><img src="images/navsp.gif" align="absmiddle" /></span><a href="">Featured Stores</a><span id="sp"><img src="images/navsp.gif" align="absmiddle" /></span><a href="browse.php">Featured Items</a><span id="sp"><img src="images/navsp.gif" align="absmiddle" /></span><a href="">About Us</a><span id="sp"><img src="images/navsp.gif" align="absmiddle" /></span><a href="">Contact Us</a><span id="sp"><img src="images/navsp.gif" align="absmiddle" /></span><a href="">Help</a></div> </div>--> <!-- banner image --> <div id="banner"><img src="images/banner.jpg" width="764" height="150" alt="Welcome to the Mall!" title="Welcome to the Mall!" border="0" /></div> <div id="midspacer"></div> <div id="mallbody"> <!-- left navigation --> <div id="leftnav"> <div class="menu_topleftcorner"><img src="images/menu_topleftcorner.jpg" width="6" height="6" border="0" /></div> <br/> <div class="sections">Mall Categories</div> <div id="navcontainer"> <ul id="navlist"> <li id="active"><a href="#" id="current">Home</a></li> <li><a href="">Books, Music & Movies</a></li> <li><a href="">Clothing & Apparel</a></li> </ul> </div> <br/> <div class="sections">Shop by Store</div> <ul id="navlist"> <li id="active"><a href="#">Salsa Products</a></li> </ul> <div class="menusp"></div> <div class="menu_bottomleftcorner"><img src="images/menu_bottomleftcorner.jpg" width="6" height="6" border="0" /></div> </div> <!-- content --> <div id="content"> <p><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/></p> </div> <!-- right navigation --> <div id="rightnav"> <p></p> </div> </div> </div> <!-- end mall --> </div> <!-- end main --> </div> <!-- end wrapper --> <div id="footer"> <div id="bg"> ads ad ad a </div> <div id="compliant"> <a href="http://validator.org/check/referer" target="_blank"><img src="images/compliant/w3cxhtml10.png" width="80" height="15" alt="W3C XHTML 1.0 Validated" title="W3C XHTML 1.0 Validated" border="0" /></a> <a href="http://jigsaw.w3.org/check/referer" target="_blank"><img src="images/compliant/w3ccss.png" width="80" height="15" alt="W3C CSS 1.0 Validated" title="W3C CSS 1.0 Validated" border="0" /></a> <a href="http://www.mozilla.org" target="_blank"><img src="images/compliant/mozilla.png" width="80" height="15" alt="Mozilla Firefox Browser Compatible" title="Mozilla Firefox Browser Compatible" border="0" /></a> </div> </div> <!-- end footer --> </body> </html> PS - Kravitz, I've check alot of the links you have posted. While they were helpful, I wasn't successful in implemented many of the techniques suggested in them to solve my problems. Using my http://www.thatspotonline.com as an example I'll explain my problem. I'm trying to use a 3 column fluid layout with a header and a footer. I've gotten past the browser problem with IE and now face a new problem with proper display in firefox. With the included css and attached xhtml layout I end up with a rather large gap on the bottom of the design without adding quite a bit of content to make the page length grow. I've tested with about everything else and this problem doesn't show up. I would gladly take some advise if anyone has any thanks. Code: * { margin:0 auto; padding:0; } h2 { font:bold 2em/1.4 "Lucida Bright", Georgia, Times, serif; color:#8B9F86; } h3 { font:bold 1em/1.6 "Lucida Bright", Georgia, Times, serif; color:#845697; } a { color:#4C53E0; } a:focus, a:hover, a:active { color:#EB8518; } body { background:#000000 url(images/body2.jpg); background-repeat:repeat; background-position:top left; font-size:90%; margin:0 auto; padding: 24px 0; } #outer { margin:0 auto; width:80%; min-width:40em; max-width:70em; border:10px solid #EEEEEE; border-width:0 5px; background:#EEEEEE; } ul#nav:after, #outer:after, #sub:after, form:after, form div:after { content:"."; display:block; visibility:hidden; clear:both; height:0; } * html #nav, * html #content, * html form, * html form div { height:1%; } ul#access, .off { position:absolute; left:-1000em; top:-1000em; } hr {display:none} #header { background:#EBEBE9 url(images/banner-bg2.jpg) repeat-x left bottom; } #header h1 { padding-left:.6em; font:bold 3em/2.5 "Lucida Bright", Georgia, Times, serif; /* line-height allows for image of buildings */ letter-spacing:1pt; color:#FFFFFF; background: transparent url(images/banner2.jpg) no-repeat right bottom; } #header h1 a { color:#FFFFFF; text-decoration:none; } ul#nav { list-style:none; margin:3px 0 1em; text-align:center; background:#FFFFFF; border-top:2px solid #444444; border-bottom:2px solid #444444; } #nav li { list-style:none; margin:0 auto; width:94%; min-width:40em; max-width:70em; display:block; text-align:center; background:#000000; } * html #nav li { width:24.9%; } #nav a { display:block; font:bold 1em/1.8 'Lucida Grande', Arial, tahoma, verdana, sans-serif; text-decoration:none; color:#444444; margin:1px; background:#FFFFFF; } #nav a:focus, #nav a:hover, #nav a:active { border:1px inset #8B9F86; margin:0; color:#EB8518; text-decoration:underline; } ul#nav li#active { background:#FFFFFF; font:bold 1em/1.8 'Lucida Grande', Arial, tahoma, verdana, sans-serif; color:#000000; text-decoration:underline; } #sub, #right { font: 1em/1.5 'Lucida Grande', arial, verdana, sans-serif; word-spacing:.1em; margin-bottom:1em; } #sub { width:74%; float:left; position:relative; } #center { width:65%; float:right; } #left { width:33%; float:left; } #right { width:25%; float:right; } #center p { margin:.5em 2% .5em 0; } img.img-right { float:right; } #left h2 { color:#845697; font-size:1.5em; } #left p { font-size:.9em; } #right { font-size:.9em; } #right h2 { font-size:1.2em; } /** Footer **/ #footer { clear:both; margin-top:1em; font: 0.9em/1 'Lucida Grande', arial, tahoma, verdana, sans-serif; border-top:3px double #C8DCC2; } #footer p { margin:1em 1em 1em 0; text-align:center; padding: 21px 0; } #footer ul { list-style:none; margin-top:.7em; } #footer li { display:inline; border-right: 1px solid #C8DCC2; padding:.3em 2%; } This is my first ever tableless layout, so I apologize if there's a lot of bloat or if I ask stupid questions that have been covered time and time again. I have two problems I'm hoping someone can help with... The layout I'm trying to create will have a centered div that stretches 100% to the height of the window, or more if the content outgrows that. At the top of this is the navigation and header, below that is the content, and at the bottom is the footer. Now for the problems. The first issue I'm having: Since the center column is set to 100% height (and the HTML and BODY heights are also 100%), it extends to the height of the window. For the sake of conversation we'll say the window area is 600px high. The problem comes in when the navigation, header and content exceed 600px. The center column stays 600px high (since that's the height of the window), but doesn't stretch to accommodate the content. (see 2.gif) The second issue: I can't get the footer to behave properly. If I have the position set to relative (see 1.gif), it will rest at the bottom of the content. If I have it set to absolute, it rests at the bottom of the window - but overlaps the content. What I suspect is that I need to find out how to make #wrapper extend to more than 100% if content is placed in it, and then make #footer "relatively absolute"... if that's possible. Can anyone help? The page itself is at http://ssp.number-three.com/index.html, and the style sheet is http://ssp.number-three.com/style_default.css. You can see an example on http://www.cauwenbergh.be/dzone/ The yellow div does not fill between header and footer when there is not enough text in it :s So is there any way to get it filled between header and footer... html: Code: <div id="wrap"> <div id="header"> <div id="balk"> <div id="balk_midden">...</div> </div> <div id="header_wrap"> <img src="images/header.gif" alt="Dutchzone voor al uw internettoepassingen: Webhosting - webdesign - netwerken"/> </div> <div id="balk"> <div id="balk_midden">...</div> </div> </div> <div id="inner-wrap"> <div id="pagebox">Hier komt tekst</div> </div> <div id="footer"> <div id="copyright">Footer</div> </div> </div> css: Code: body, html { height:100%; } body { margin:0; padding:0; background-image:url(../images/bg34.gif); font-family: "trebuchet ms", verdana, helvetica, sans-serif; font-size: 14px; } #wrap { position:relative; width:100%; margin:auto; min-height:100%; } * html #wrap { height:100%; } #inner-wrap { padding-bottom:20px; } #inner-wrap:after { content:" "; display:block; clear:both; background-color:#00FF33; } * html #inner-wrap { height:1px; } #header_wrap { background:#333333 url(../images/dzheader_back.gif); color:#FF00FF; margin:0; padding:0; height:120px; text-align: center; } #balk { padding: 0px; width: 100%; background-color:#7999B9; border-bottom: 1px solid #F7F7F9; border-top: 1px solid #F7F7F9; height: 20px; } #balk_midden { width: 800px; margin-left: auto; margin-right: auto; background-color:#7999B9; border-right: 1px solid #FFFFFF; border-left: 1px solid #FFFFFF; color: #FFFFFF; line-height: 20px; text-align: right; } #header { background-image:url(../images/dzheader_back.gif); margin: 0px; margin-left: auto; margin-right: auto; padding: 0px; } #header img { text-align:center; border-left: 1px solid #FFFFFF; border-right: 1px solid #FFFFFF; margin:0; margin-bottom: -4px; padding-left: 30px; padding-right: 30px; } #pagebox { width: 800px; margin: auto; background-color:#FFFF00; border-left: 1px solid #807E7A; border-right: 1px solid #807E7A; height: 300px; } #footer { position:absolute; bottom:0; width:100%; height:20px; background-color:#7999B9; } #copyright { padding: 0px; width: 800px; text-align: center; background-color:#7999B9; border-left: 1px solid #FFFFFF; border-right: 1px solid #FFFFFF; vertical-align: bottom; margin: 0 auto 0 auto; color: #FFFFFF; bottom: 0; height: 20px; } Hello, I am resolving problem on my website. You can see example the http://subrjiri.cz/domains/subrjiri.cz/sanc-akustika.cz/ There is a Header, Main and Footer. Header and main are margin left and right: auto, cause width is 900px and it's on middle. Footer part isn't 900px, its full width and some height. The problem is that the footer is black background and top is white. And of course when somebody has really high resolution, then he see good header, good main, good footer and then blank white place depending on his resolution. That blank space is under footer. Of course footer should be on the bottom of the page for all resolutions and no white place under footer. You can see that problem on this link http://subrjiri.cz/domains/subrjiri.cz/sanc-akustika.cz/akusticka-studie cause there is not too much text, on big pages it's without problem. You can see blank white place under footer. I can set high padding for footer but it doesn't look nice. Thanks for your opinion. Hello, I have been working on this for over 2 days and learning plenty in the process. Yet, I have come to a roadblock. I need the footer, which is outside the main container, to extend to the height of the page. The problem is that the page height changes with each page, and will change in the future, as the info for the pages will be pulled from a database. Please have a look at the footer on my site and tell me what might be a good solution. Here's the site: http://www.caillouette.com/FriendsCSS2/index.php thanks -Sean |