CSS - Setting Div To Height Of Document, Not Viewport
I've got a problematic background DIV. It fills up the entire viewport and looks correct, but cuts off at the bottom (one screen height down) when I scroll. How can I get this DIV to span the entire height of the document, instead of just the height of the viewport?
BTW, it works fine in IE 6, but cuts off in FireFox 0.9, Opera 7.5, and Netscape 7.1 Here's the code (you'll have to populate the content DIV to get scrollbars and witness the problem): Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- body { margin: 0; padding: 0; height: 100%; background-color: #F1EFE2; } html { margin: 0; padding: 0; height: 100%; } .bg { position: relative; margin-top: 0px; margin-left: auto; margin-right: auto; margin-bottom: 0px; width: 960px; height: 100%; background: #F7F6EF; text-align: center; border-right-color: #9E987F; border-right-width: 1px; border-right-style: solid; border-left-width: 1px; border-left-style: solid; border-left-color: #9E987F; } .heading { position: relative; margin-top: 0px; margin-left: 0px; margin-right: 0px; width: 100%; background: #7C2812; color: #F7F6EF; vertical-align: middle; text-align:left; padding-top: 10px; padding-bottom: 10px; text-indent: 10px; } .content { position: relative; top: 20px; padding-left: 15px; padding-right: 15px; width: 920px; vertical-align: top; text-align:left; } --> </style> </head> <body onResize="window.location.href = window.location.href;"> <div class="bg"> <div class="heading"> heading goes here </div> <div class="content"> content goes here </div> </div> </body> </html> Any help would be greatly appreciated! Similar TutorialsCoding my site up, and I've hit a stump. I've got a box div that I'm putting text in. I try adjusting the height, and it works fine in Mozilla/Firebird, but IE just seems to ignore it (which is causing me problems). Anyone familiar with this? Hi guys, Before I go on, here's the page I'm referring to: http://student-consolidation-loans.co.uk/newsite3/ In IE 6 on the PC the layout is how I want it, however, skip over to the mac and it doesn't look correct in any browser (safari, IE, firefox...) The problem is I've given one of the DIVs (the one that contains the white and black diagonally striped background) an auto height so it stretches to fit all the content, but while IE 6 is picking up on this none of the mac browsers are. Is there a workaround? thanks! this is my layout as of now http://72.232.208.44/new/ you can probally look at it and see what else needs to be done, its very close to completion. theres a div called "left-side-gradient" which is that small thing light bluegreenish line down the left side. right now how ti works is however long i set that line to be is how long the main content area is. which is backwards, i need the left-side-gradient line to be however long the main content div is. and the main content div needs to always stretch down to the bottom panel i've tried everything with all sorts of css variations and i can't figure it out. also i need to do the same sort of effect to the right-side-gradient. but im sure if someone tells me how i can fix the left side i can apply the same sort of rules to the right side. also the top banner portion and the lower content portion has this small gap in them. i can't seem to get that gap to go away either :/ (my html and css are w3 validated) HTML Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>page</title> <SCRIPT SRC="javascript.js" type="text/javascript"></SCRIPT> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body> <div id="container"> <div id="banner"> </div> <div id="banner_under"> <ul id="float_ul"> <li><a href="index.html" onMouseover="lightup('pic1')" onMouseout="turnoff('pic1')"><img src="images/bHome.jpg" class="noborder" name="pic1" width="56" height="28" alt="Go Fast Gaming - Home"></a></li> <li><a href="services.php" onMouseover="lightup('pic2')" onMouseout="turnoff('pic2')"><img src="images/bServices.jpg" class="noborder" name="pic2" width="78" height="28" alt="Go Fast Gaming - Services"></a></li> <li><a href="contact.php" onMouseover="lightup('pic3')" onMouseout="turnoff('pic3')"><img src="images/bContact.jpg" class="noborder" name="pic3" width="73" height="28" alt="Go Fast Gaming - Contact"></a></li> <li><a href="controlpanel.php" onMouseover="lightup('pic4')" onMouseout="turnoff('pic4')"><img src="images/bControlPanel.jpg" class="noborder" name="pic4" width="113" height="28" alt="GO Fast Gaming - Control Panel"></a></li> </ul> </div> <div id="below_banner_container"> <ul id="float_ul"> <li><div id="top-left-gradient-extension"></div></li> <li><div id="top-middle-extension"></div></li> <li><div id="right-side-extension"></div></li> <li><div id="top-right-extension"></div></li> </ul> <ul id="float_ul"> <li> <div id="left_main"> <ul id="float_ul"> <li><div id="left-side-gradient"></div></li> <li><div id="content_area"><h2>Big Title</h2><br>stuffstuffstuffstuff stuffstuffstuffstuffstuffstuff stuffstuffstuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff</div></li> </ul> </div> <div id="right_main"> <ul id="float_ul"> <li><div id="right-side-gradient"></div></li> <li><div id="right-side-text">falala f f f f f f f f f f f f f f f f f f f f f f f f f fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvvvv</div></li> </ul> <ul id="float_ul"> <li><div id="right-side-split"></div></li> </ul> <ul id="float_ul"> <li><div id="right-side-gradient"></div></li> <li><div id="right-side-text">falala f f f f f f f f f f f f f f f f f f f f f f f f f fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvv fvvvv</div></li> </ul> </div> </li> </ul> <ul id="float_ul"> <li> <div id="bottom_panel-upper"> textextextext </div> <div id="bottom_panel-lower"> text text text text </div> </li> </ul> </div> </div> </body> </html> CSS Code: BODY{background-color:#003333;margin:auto;} .noborder{border:thin none #000000;} .center_text{ text-align:center; } #float_ul{ padding: 0; margin: 0; float: right; } #float_ul li { padding: 0; margin: 0; display: inline; list-style-type: none; float:left; } #container{ width:750px; margin:auto; text-align:center; } #below_banner_container{ border:thin none #000000; border-spacing:0; margin:auto;; text-align:center; padding:0; width:750px; } /* END MISC CLASSES BEGIN BANNER CLASSES */ #banner{ border:thin none #000000; border-spacing:0; padding:0; width:750px; height:155px; background-image:url("images/GFG-topBanner_01.jpg"); background-repeat: no-repeat; } #banner_under{ border:thin none #000000; border-spacing:0; padding:0; width:750px; height:28px; background-image:url("images/GFG-topBanner_02.jpg"); background-repeat: no-repeat; } /* END BANNER CLASSES BEGIN EXTENSION CLASSES */ #top-left-gradient-extension{ border:thin none #000000; border-spacing:0; padding:0; background-color:#339999; width:1px; height:30px; float:left; } #top-middle-extension{ border:thin none #000000; border-spacing:0; padding:0; background-color:#006666; width:500px; height:30px; text-align:left; vertical-align:top; } #right-side-extension{ border:thin none #000000; border-spacing:0; padding:0; background-color:#006666; width:49px; height:30px; background-image:url("images/right-side-extension.jpg"); background-repeat: no-repeat; } #top-right-extension{ border:thin none #000000; border-spacing:0; padding:0; background-color:#339999; width:200px; height:30px; background-image:url("images/top-right-extension.jpg"); background-repeat: no-repeat; } /* END EXTENSION CLASSES BEGIN LEFT SIDE CLASSES */ #left_main{ border:thin none #000000; border-spacing:0; padding:0; background-color:#006666; width:550px; text-align:left; vertical-align:top; float:left; } #left-side-gradient{ border:thin none #000000; border-spacing:0; padding:0; background-color:#339999; width:1px; height:400px; position:relative; } #content_area{ border:thin none #000000; border-spacing:0; padding:0; background-color:#006666; width:549px; text-align:left; vertical-align:top; background-image:url("images/left-side-gradient.jpg"); background-repeat: repeat-y; } /* END LEFT SIDE CLASSES BEGIN RIGHT SIDE CLASSES */ #right_main{ border:thin none #000000; border-spacing:0; padding:0; background-color:#339999; width:200px; text-align:left; vertical-align:top; float:right; } #right-side-gradient{ border:thin none #000000; border-spacing:0; padding:0; background-color:#339999; width:6px; height:100px; background-image:url("images/side-gradient.jpg"); background-repeat: repeat-y; position:relative; } #right-side-text{ border:thin none #000000; border-spacing:0; padding:0; background-color:#339999; width:194px; text-align:left; vertical-align:top; } #right-side-split{ border:thin none #000000; border-spacing:0; padding:0; background-color:#339999; width:200px; height:31px; background-image:url("images/right-column-split.jpg"); background-repeat: no-repeat; } /* END RIGHT SIDE CLASSES BEGIN BOTTOM PANEL CLASSES */ #bottom_panel-upper{ border:thin none #000000; border-spacing:0; padding:0; background-color:#339999; width:750px; height:20px; font-size:13px; text-align:center; vertical-align:top; } #bottom_panel-lower{ border:thin none #000000; border-spacing:0; padding:0; background-color:#339999; width:750px; height:20px; font-size:11px; text-align:center; vertical-align:top; } Fixed. Greets, I'm trying to get the follwing collumns to display on the complete height of the element they are nested in. Each of the 3 collumns currently only take the space required by the content that is in said element. Preview: The current layout is set with 3 divs (2 left floating, and the bigger one on right-float). I don't want to use tables/cells and I cannot use min-height as the content will be filled by the customer using a CMS. I Wish i could use something like: Code: #col_1 {height: parent.height;} here is a link to the actual page, please note that to use the style i am talking about you will have to use the top left select element and choose GH_02 -v. (this is my 1st attempt to have the same content with multiple css sets...) Is there a way that this can be done, basically I have a div hidden based on certain JS logic, but the amount of space of the content in the div is still taken up on the screen. I would like to make the div say 0xp and discard content. Is there any code that can help me, I've looked but can't find. Thanks I'm wondering what's the word is called for setting the image width and height in CSS Code: img.test { <<What's the keyword??>>: 10 px; } Thanks, FletchSOD Is there a way to expand the height and width of a DIV to the height and width of the document, not the browser window? When I set it too 100%, and scroll, the div remains the size of the original window. The DIV is for a background grey out screen, and I want it to encompass the height and width of the document and persist when scrolling. Explicitly setting height and width with pixels doesn't work, because that depends on the user's screen resolution. Any thoughts? Many thanks... I have some tables that contain a lot of columns, so the table goes beyond the users viewport. I would like the body of the page to expand to the table, anyone know of a way to get the body to expand horizontally. Below is some code, I would like the red outline to expand to the black. Code: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title> </head> <body style="border:1px solid red;"> <table style="border:1px solid green;width:2500px;"> <tr> <td style="">slkfdj</td> </tr> </table> </body> </html> Greetings, I'm trying to implement a pseudo-modal dialog by layering the following: A div containing an iframe to be loaded with a form page A semi-transparent div to cover the entire underlying page, to prevent clicks on other elements The problem is that the cover div is only as tall as the viewport, which means that any page content in the scroll area below the viewport is left exposed. Below is the source. Any suggestions would be most appreciated! Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> <title>Test</title> <style type="TEXT/CSS"> html,body { margin:0; padding:0; height:100%; } #contactDiv{ z-index:2; display:none; position:absolute; top:100px; left: 50%; margin-left:-300px; border-style:solid; height:450px; width:600px; background-color:#ffffff; border-color:#666666; border-width:10px; } #modalOverlay{ z-index:1; display:none; position:absolute; top:0px; left: 50%; width:1008px; margin-left:-505px; min-height:100%; background-color:#000000; filter: alpha(opacity=30); -moz-opacity: 0.3; -khtml-opacity: 0.3; opacity: 0.3; } </style> </head> <body> <a onclick= "javascript:document.getElementById('modalOverlay').style.display='block'; document.getElementById('contactDiv').style.display='block';"> SHOW IT</a> <p> <div id=contactDiv> <iframe id=contactIframe width=600 height=450 scrolling="no" frameborder=0></iframe> </div> <div id=modalOverlay> </div> testing testing testing testing testing testing testing testing (The word "testing" was actually repeated multiple times -- enough to force scrolling on my laptop. I edited it for (relative) brevity.) </body> </html> This is a simplified version of the actual page. There's a menubar with a link that populates the div with the actual contact form. I cut out everything that didn't relate to the problem. Thanks, DM I've been searching for a few days, but I haven't found a solution to my problem. How do I get my parent DIV to expand to contain all of my content beyond the viewport? CSS: Code: html { margin: 0px; padding: 0px; height: 100%; width: 100%; min-height: 100%; } body { margin: 0px; padding: 0px; height: 100%; width: 100%; min-height: 100%; } .page { background-color: #dddddd; margin-left: -390px; border-top-width: thin; border-right-width: thin; border-bottom-width: thin; border-left-width: thin; border-right-style: solid; border-left-style: solid; border-top-color: #9CB0C0; border-right-color: #9CB0C0; border-bottom-color: #9CB0C0; border-left-color: #9CB0C0; position: absolute; height: 100%; min-height: 100%; width: 780px; left: 50%; top: 0; } .header { position: absolute; height: 158px; width: 764px; background-color: #FFFFFF; left: 7px; top: 0px; } .content { position: absolute; left: 7px; top: 159px; background-color: #9CB0C0; height: 821px; width: 764px; margin-bottom: 34px; } .footer { background-color: #415569; height: 34px; width: 764px; left: 7px; bottom: 0px; } And the HTML: Code: <?xml version="1.0" encoding="iso-8859-1"?> <!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>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link href="/test.css" rel="stylesheet" type="text/css" /> <script language="JavaScript" type="text/JavaScript"> <!-- function MM_reloadPage(init) { //reloads the window if Nav4 resized if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload(); } MM_reloadPage(true); //--> </script> </head> <body> <div id="lPage" style="position:absolute; z-index:1" class="page"> <div id="lContent" style="position:absolute; z-index:2;" class="content"></div> <div id="lHeader" style="position:absolute; z-index:1" class="header"></div> <div id="lfooter" style="position:absolute; z-index:3" class="footer"></div> </div> </body> </html> I've searched through a few of the threads here, but haven't been able to find an answer either. Thanks, Brent is it possible? its the banner... the content spans around 1000 pixels wide so with 100% width i miss a piece when i scroll to right of page just making the body around 1000 pixels seems to get a horizontal scrollbar when its not needed for the content....either that or its just missing some pixels... cant a div be 100% of the page? I have created a CSS site that has a footer spanning the bottom of the viewport and whilst I have managed to glue it to the bottom I have another div that is behind it even though I think I have set-up the container properly. The troublesome page is http://www.cimbian.co.uk/BognorArchers/recurve.htm and you will see that the bottom of the text in the main pane is obscured by the footer. Basically I have a meta-wrapper for the whole page: and then have the main content within it. Following on from the content I have the footer and then I close the meta-wrapper. Something like this: <div id="meta_wrapper"> <div id="BA_main_content_area" class="clearfix"> <div id="BA_Main_Full_Width"> </div> <div id="footer"> </div> </div> My CSS for this is: div#meta_wrapper { width: 760px; margin-left: auto; margin-right: auto; background-color: yellowgreen; text-align: left; position: relative; min-height: 100%; height: 100%; voice-family: "\"}\""; voice-family: inherit; } html>body #meta_wrapper { height: auto; } div#BA_main_content_area {width:760px; align: center; margin-top: 0; margin-right: 0; margin-bottom: 0; margin-left: 0; font-size: 0.85em } div#BA_Main_Full_Width { border:3px inset yellow; font-family: Verdana; font-size: 0.85em; text-align: justify; position: relative; width: 500px; margin: 10px 30px 0px 10px; padding: 3px; background-color: #FFFFCC; float: left; } div#footer { position: absolute; bottom: 0; width:760px; padding:4px 0; font-size: 0.6em; text-align: center; background-color: white; /* Blue */ border-top:1px solid yellow; border-bottom:2px solid yellow; margin-top:1.5em;} /* orange border */ The problem occurs in IE and in Netscape so although I have box-model problems due to IE in Firefox the problem is not limited to IE. As far as I can tell from much web-reading and a couple of books this should do it. Any thoughts? PS: I also posted this in the MS FP forum as I built the page in FP but have not yet found a solution so please don't yell if you have seen the post there too ;-) Hi all, I am trying to automate everything on my test website and I have one more angle to cover. In effect, I want to adjust the line-height property (which I can do) based on the number of files within a specific folder (PHP and already done). The more files in the folder, the lower the line-height value must be. This is to ensure if I copy additional files into the folder, then the navigation menu (which is PHP reading files in this particular folder) will alter the CSS line-height property accordingly to ensure it can never exceed a certain height. Sounds wierd? go to www.re3.org.uk (next to the RE3 image, I have a list of hyperlinks which are obtained from files within the folder) My problem, when adjusting the CSS property (which is set as cm in *.css file) in javascript, it doesn't correspond correctly, the line-height property in javascript doesn't appear to be work in cm but some other measurement. Does anyone know how to change what unit of measurement Javascript works in? Or does anyone know what unit of measurement javascript uses when adjusting line-height / line-width values? I want to create a mini-algorithm that works out the appropriate line-height based on the image height (got that already) and the number of files in the folder (got that too) so the menu automatically adjusts to fit. Whew! It seem that everytime I added the image tag, the div'x area get bigger in IE but not in Mozilla/Firefox browser. So, I thought by added the "margin-bottom:-360px;" to the div would fix it but it had an opposite effect. Meaning it worked in IE but Mozilla show a vertical scrollbar. So, does anyone know how can I make the <img> overlap one another without being stacked on one after another in height for IE if I take out the "margin-bottom: -360px;"? Thanks... Code: div.divBox1 { width: 286px; height: 359px; float: left; } div.divClearFloat { clear: both; height: 0px; /* For IE Stupidity (it added some spaces after clearing the float) */ font-size: 1pt; /* For IE Stupidity (minimum height only work with current font-size somewhere) */ } div.divDottedLineAdvertisementSeperator1 { width: 575px; height: 3px; background-color: #ff0000; font-size: 1pt; /* For IE Stupidity (minimum height only work with current font-size somewhere) */ } Code: <div class="divBox1"> <div style="margin-bottom:-360px;"> <img src="images/doctor.jpg" style="position:relative;top:0px;left:0px;z-index:2;"> <img src="images/we_help.jpg" style="position:relative;top:-360px;left:0px;z-index:1;"> </div> </div> <div class="divClearFloat"></div> <div class="divDottedLineAdvertisementSeperator1"></div> I've never done much CSS work, but I know this has to be an easy fix. Each DIV appears to be 10px higher when viewed in IE. I want them to be 8px high and they end up being 18px high. In Firefox, Netscape, and Opera it works fine. Anyone mind correcting this imbarrassing little problem? 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" > <head> <title>IE 10px Padding Problem</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <style type="text/css"> body { margin:0px; } #container { position:relative; margin:auto; width:730px; } #header { height:110px; } .textualtop { border:1px solid #000000; height:8px; } .textualbottom { border:1px solid #000000; height:8px; } </style> </head> <body> <div id="container"> <div id="header"></div> <div class="textualtop"></div> <div class="textualbottom"></div> <div class="textualtop"></div> <div class="textualbottom"></div> <p>Notice how in IE6 each DIV is 10px higher then in FF. Why is it doing this?</p> </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 Hello everybody! I have been having a big problem with my webpage for a long time now and hope I can find an answer to my problem with your help. I want a div that contains the content of my pages (which varies in length depending on the individual page) to stretch the length of my page, but it only stretches the length of the window. Here's the HTML and CSS: HTML (I only included the very basic structure): <html> <body> <div class="container"> <div id="content"> <div id="..."></div> <div id="..."></div> <div id="..."></div> <div id="..."></div> </div> </div> </body> </html>` CSS: html, body { height: 100%; font-family: Arial; font-size: 10px; color: #000000; background: #FFF url(../../images/body.png) no-repeat center 40px; margin: 0; position: relative;} .container { height: 100%; width: 960px; margin-right: auto; margin-left: auto; position: relative;} #content { width: 939px; min-height: 100%; position: relative; top: 210px; left: 6px; box-shadow: 0px 0px 8px #666; -moz-box-shadow: 0px 0px 8px #666; -webkit-box-shadow: 0px 0px 8px #666; background-color: #FFF;} I tried to set the content div to overflow: auto, but that includes a scroll bar for the content div that I do not want. It does, however, create the desired effect of the shadow and background of the #content div all the way to the end of the page. Am I missing anything? I thought min-height would work, but it doesn't! It only stretches the content div to page height and everything else is overflow, but without the content div's background color and shadow. Does anybody maybe see where the problem lies? Thank you so much in advance for your help. If you look at the bottom of the page at www.res-technologies_DOT_com/index.php?jos_change_template=restech2 in both IE and FF, you will see that it looks fine in IE, but in FF the page length is extended by exactly the height of the header image at the top of the page. Trying to figure out what's causing this is driving me nuts! Can anyone help? thx dh |