CSS - Div Doesn't Stretch To Page Height, Only Window Height
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. Similar TutorialsHey I am developing a site for our band, and I'm having trouble getting the nav bar to look right. The page is http://www.mattbray.curvedspaces.co..._beta/index.php and I don't want the left hand section to stop halfway down the page. The stylesheet is called style.css in the same directory. Code: /* page defaults */ body { margin: 0px; padding: 0px; text-align:center; font-family: Verdana, Arial, Helvetica, sans-serif; background-color: #EAEAEA; } /* Layout divs */ #container { font-family: Verdana, Arial, Helvetica, sans-serif; color: #666666; position: static; left: 40px; top: 12px; padding: 0px; width: 800px; border-right: #003366 1px solid; border-left: #003366 1px solid; margin-right: auto; margin-left: auto; height: auto; text-align:left; background-color: #FFFFFF; } #title { background-image: url(images/saved_title.gif); margin-top: 10px; background-repeat: no-repeat; height: 150px; border-top-color: #000000; border-top-style: solid; border-top-width: 1px; border-bottom-color: #000000; border-bottom-style: solid; border-bottom-width: 1px; border-color: #000000; } #navbar { background-image: url(images/navbar.gif); background-repeat: no-repeat; border-bottom-color: #000000; border-bottom-style: solid; border-bottom-width: 1px; padding: 5px; height: 20px; font-family: Verdana, Arial, Helvetica, sans-serif; } #navwin { font-family: Verdana, Arial, Helvetica, sans-serif; border-right: 1px solid black; padding: 5px; background-color: #CCCFFF; width: 230px; height: 100%; margin: 0; float: left; font-size: medium; } #content { float: left; font-family: Verdana, Arial, Helvetica, sans-serif; padding: 10px; padding-top: 40px; background-image: url(images/content.gif); background-repeat: no-repeat; background-position: -239px 0px; background-color: #FFFFFF; height: auto; width: 539px; } #footer { font-family: Verdana, Arial, Helvetica, sans-serif; background-color: #CCCCCC; margin-bottom: 10px; padding: 10px; border-top: solid 1px black; border-bottom: solid 1px black; width: 780px; height: 25px; text-align: center; } /* Links */ a:link { color: #006699; } a:visited { color: #006699; } a:hover { color: #006699; text-decoration: none; } a:active { color: #006699; } /* elements */ #navwin h2 { font-size: large; display: block; } #navwin ul {} thanks Matt alright I'm stumped so please please please help me out! I have a page that's 100% in height, and usually there's more information so you have to scroll down. but I can't seem to activate the scrollbar. I've tried overflow, messing with the height attribute, i have no idea how to solve this. my page: http://www.aapinboom.nl/luxeduinvil...ntroductie.html and this is the code: Code: html,body { background-image: url('../images/bg.gif'); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; font-family: "Trebuchet MS"; font-size: 13px; height: 100%; } #center { text-align: center; width: 100%; height: 100%; } #container { margin-left: auto; margin-right: auto; width: 600px; height: 100%; border: 1px solid #B8B8B8; background-color: #FFFFFF; text-align: left; } thanks for any suggestions! right.... i have two fixed width columns and i want them to be the same height - the height of whichever has the most content. so i figured i do something like: +---------------------+ | +-----+ +----+ | | | | | | | | | | | b | | | | a | | | | | | | +----+ | | | | | | +-----+ | +---------------------+ (OK - problems with spaces and non breaking thingy.. do you get the idea though? ) the container div will stretch to fit the content, divs a and b will increase in height depending on content. so i was thinking if i set divs a and b to be 100% height it would work. however, this will do nothing if i haven't defined the height of the parent (container). so i think, ok, i'll set that to 100% as well. however this does not work. when i say "does not work" i mean the following: my container div fills the viewport. the column divs stretch from the bottom to the top of the page. -- all ok this far. when i add a load of content, i the div (a or b) will stretch beyond the viewport BUT the other one doesn't. now.. does anyone have any ideas of how i could do this? has anyone seen this anywhere? any help appreciated. d I am baffled by what seems like a simple task which I can't seem to find the solution to. I've two columns (#top_left, #top_right) inside a containing div (#top_container). I want both columns to be the same height (100%). So if the column on the right has more content, the column on the left will stretch to match the same height. If I set a fixed height on the containing div (#top_container), it fixes the issue, since at this point my declaration of height:100% on the two columns actually knows what it is supposed to be 100% of. But then I run into overflow issues if the content goes over fixed height and when I try min-height, the columns fail to stretch once more. Here is my code: Code: <style type="text/css"> #top_container {width:760px;} #top_left {float:left; height:100%; width:200px;} #top_right {float:left; height:100%; width:560px;} </style> <div id="top_container"> <div id="top_left">Content</div> <div id="top_right">Content</div> <br clear="all" /> </div> I've slimmed down the code and cut out non relevant pieces like font styling, colors, and other non pertinent sections. 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 Hello, I'm working now on div layout that contains 3 sections (header, body, footer) in one centered wrapper with border (divs with background imgs). My problem is: - divs that are in fact borders (id="l_outerborder_b" and id="r_outerborder_b") don't stretch when main container (id="body_content_text") grows. Here is a html code: Code: <!--BEGIN TEMPLATE HEADER --> <!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> <link href="template.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="template.js" /> </head> <body onload="onloadprocedures()"> <div id="main_container"> <div id="template_header"> <div id="tl_outerborder"></div> <div id="t_outerborder"></div> <div id="tr_outerborder"></div> <div id="l_outerborder_h"></div> <div id="header_content"> <div id="logo"><img src="img/logo.png" alt="" /></div> <div id="slogan"><img src="img/slogan.png" alt="Centrum zdrowia" /></div> </div> <div id="r_outerborder_h"></div> </div> <!-- END TEMPLATE HEADER --> <!-- BEGIN TEMPLATE BODY --> <div id="template_body"> <div id="l_outerborder_b"></div> <div id="body_content"> <div id="body_content_text"> <p>TEST</p> </div> </div> <div id="r_outerborder_b"></div> </div> <!-- END TEMPLATE BODY --> <!-- BEGIN TEMPLATE FOOTER --> <div id="template_footer"> <div style="clear:both"></div> <div id="l_outerborder_f"></div> <div id="footer_content"></div> <div id="l_outerborder_f"></div> <div id="bl_outerborder"></div> <div id="b_outerborder"></div> <div id="br_outerborder"></div> </div> </div> </body> </html> <!-- END TEMPLATE FOOTER --> and CSS: Code: @charset "utf-8"; /* CSS Document */ body { background-color:#FFFFFF; font-family:Tahoma, Verdana, "Times New Roman", Arial; font-size:12px; } a:link {text-decoration: none} /* unvisited link */ a:visited {text-decoration: none} /* visited link */ a:hover {text-decoration: none} /* mouse over link */ a:active {text-decoration: none} /* selected link */ #main_container { position:relative; margin:auto; width:960px; height:auto; } #template_header { float:left; position:relative; width:960px; height:300px; } #header_content { float:left; position:relative; width:900px; height:270px; } #logo { width:310px; height:130px; position:relative; float:left; top:0px; left:0px; } #slogan { width:580px; height:100px; position:relative; float:left; top:0px; left:0px; } #tl_outerborder { float:left; position:relative; background-image:url(img/tl_outerborder.png); width:30px; height:30px; } #t_outerborder { float:left; position:relative; background-image:url(img/t_outerborder.png); width:900px; height:30px; } #tr_outerborder { float:left; position:relative; background-image:url(img/tr_outerborder.png); width:30px; height:30px; } #l_outerborder_h { float:left; position:relative; background-image:url(img/l_outerborder.png); background-repeat:repeat-y; width:30px; height:270px; } #r_outerborder_h { float:right; position:relative; background-image:url(img/r_outerborder.png); background-repeat:repeat-y; width:30px; height:270px; } #body_content { float:left; position:relative; width:900px; overflow:hidden; } #body_content_text { float:left; position:relative; width:600px; margin: auto; overflow:hidden; } #l_outerborder_b { float:left; position:relative; background-image:url(img/l_outerborder.png); background-repeat:repeat-y; width:30px; height:inherit; } #r_outerborder_b { float:right; position:relative; background-image:url(img/r_outerborder.png); background-repeat:repeat-y; width:30px; height:inherit; } #l_outerborder_f { float:left; position:relative; background-image:url(img/l_outerborder.png); background-repeat:repeat-y; width:30px; height:inherit; } #r_outerborder_f { float:right; position:relative; background-image:url(img/r_outerborder.png); background-repeat:repeat-y; width:30px; height:inherit; } #template_body { float:left; position:relative; width:960px; overflow:hidden; } #bl_outerborder { float:left; position:relative; background-image:url(img/bl_outerborder.png); width:30px; height:30px; } #b_outerborder { float:left; position:relative; background-image:url(img/b_outerborder.png); width:900px; height:30px; } #br_outerborder { float:left; position:relative; background-image:url(img/br_outerborder.png); width:30px; height:30px; } Thanks in advance for info how to stretch those doomed divs EDIT: Here is layout concept. URL hTTp://qsrc.pl/layout.jpg 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! 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 am trying to get my container to be 100% the height of the browser window but have so far been unsuccessful, and I am not sure what I am doing wrong. Thanks for any help. 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>TEST</title> <style type="text/css" media="all"> body { margin: 0; padding: 0; color: #333; font: 13px Trebuchet MS, Lucida Sans Unicode, Arial, sans-serif; background: #EEEEEE; text-align: center; } a { color: #434C3E; } a:hover { color: #F15925; } #container { margin: 0 auto; width: 724px; height:100%; position: relative; background: #fff; padding: 0 10px 0 10px; text-align: left; } * html #container { width: 744px; w\idth: 724px; } #logo { position: absolute; top: 20px; left: 70px; width:94px; height:147px; background-image:url(../images/logo.gif); } h3 { color:#555555; } #top { height: 145px; margin-left:240px; } #container #intro #quickSummary .p1 { font-size: 11px; height: 171px; margin: 0; width: 724px; color: #fff; font: 12px/150% Trebuchet MS; } #container #intro #quickSummary .p1 span { padding: 30px 530px 0 30px; display: block; margin: 0; font: 12px/150% Trebuchet MS; } #text { margin: 20px 20px 0 243px; } #text p { line-height: 150%; margin: 10px 0 10px 0; } #footer { color: #fff; height: 48px; text-align: right; padding: 0 10px 0 0; line-height: 26px; font-size: 11px; } #footer a { color: #fff; text-decoration: none; } #footer a:hover { text-decoration: underline; } </style> </head> <body> <div id="container"> <div id="intro"> <div id="logo"></div> <div id="top"></div> <div id="text"> <h3>Heading number one</h3> <p class="p1">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam arcu purus, sodales volutpat, eleifend ac, semper ut, dolor. Curabitur porttitor suscipit ligula. Sed vehicula mauris non sapien suscipit luctus. Fusce luctus pulvinar lectus. Aenean mi. Pellentesque rutrum nibh ut diam. Mauris porta, lectus sit amet ultricies lobortis, metus mauris semper orci, porta tincidunt neque dui ac magna.</p> <p class="p2">Curabitur nunc. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vestibulum eu purus ac nisl vestibulum ultrices. Pellentesque lacus. Suspendisse quam risus, hendrerit sit amet, gravida non, dapibus quis, ante.</p> </div> </div> <div id="text"> <h3>Heading Number Two</h3> <p class="p1">Etiam nec metus vestibulum lacus facilisis consectetuer. Cras sed odio. Sed et purus a pede condimentum fermentum. In hac habitasse platea dictumst. Integer ornare nisl eu sem.</p> <p class="p2">Nam laoreet, eros non cursus varius, nisi enim pharetra nisi, ut fringilla nisl turpis a diam. Proin ac elit ut nibh nonummy ultrices. Phasellus felis quam, consectetuer in, bibendum et, dictum id, mi. Nunc quis eros id metus auctor volutpat. Nunc diam odio, vehicula a, accumsan a, semper quis, mauris. Ut mauris enim, ultricies sed, viverra non, porta vitae, dui.</p> <div> <h3>Heading Number Three</h3> <p class="p1">Curabitur nunc. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vestibulum eu purus ac nisl vestibulum ultrices. Pellentesque lacus. Suspendisse quam risus, hendrerit sit amet, gravida non, dapibus quis, ante.</p> </div> </div> <div id="footer">Foo</div> </div><!--end container--> </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 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> I deleted the other posting as it take too long to work on it and it doesn't work. So, I got the other code from google search and decided to use it. There, I rearrange, redo, customzie the scripts to make it work better. Now I have one problem. See the class "wrapper" that make use of the height. I when I have it set at 100%, the footer extend too far down and the vertical scroll bar appear at the right. This is not what I want. I figure maybe it's because of the float that the browser doesn't know the real height of the header and footer. Can anyone help? I would really apppreciated it. Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <style type="text/css"> body { margin: 0px; padding: 0px; width: 100%; height: 100%; background-color: #FFFF00; border-top: 0px solid black; /* Test/Debug, otherwise leave actual table border as 0px */ border-right: 0px solid black; /* Test/Debug, otherwise leave actual table border as 0px */ border-left: 0px solid black; /* Test/Debug, otherwise leave actual table border as 0px */ border-bottom: 0px solid black; /* Test/Debug, otherwise leave actual table border as 0px */ } html { margin: 0px; padding: 0px; width: 100%; height: 100%; width: 100%; } table { border: 0px solid #000000; border-collapse: collapse; border-spacing: 0px; } #columnleft { margin: 0px; padding: 0px; width: 10%; height: 100%; /* Required by IE to inherit from wrapper (IE Hack) above */ background-color: #0000FF; border-top: 0px solid black; /* Test/Debug, otherwise leave actual table border as 0px */ border-right: 0px solid black; /* Test/Debug, otherwise leave actual table border as 0px */ border-left: 0px solid black; /* Test/Debug, otherwise leave actual table border as 0px */ border-bottom: 0px solid black; /* Test/Debug, otherwise leave actual table border as 0px */ /* position: absolute; */ float: left; } #columnright { margin: 0px; padding: 0px; width: 10%; height: 100%; /* Required by IE to inherit from wrapper (IE Hack) above */ background-color: #0000FF; border-top: 0px solid black; /* Test/Debug, otherwise leave actual table border as 0px */ border-right: 0px solid black; /* Test/Debug, otherwise leave actual table border as 0px */ border-left: 0px solid black; /* Test/Debug, otherwise leave actual table border as 0px */ border-bottom: 0px solid black; /* Test/Debug, otherwise leave actual table border as 0px */ /* position: absolute; */ float: right; } #footer { margin: 0px; padding: 0px; width: 100%; height: 65px; background-color: #FFCC00; border-top: 0px solid black; /* Test/Debug, otherwise leave actual table border as 0px */ border-right: 0px solid black; /* Test/Debug, otherwise leave actual table border as 0px */ border-left: 0px solid black; /* Test/Debug, otherwise leave actual table border as 0px */ border-bottom: 0px solid black; /* Test/Debug, otherwise leave actual table border as 0px */ /* position: relative; */ } #clearfooter { clear: both; } #header { margin: 0px; padding: 0px; width: 100%; height: 65px; background-color: #FFCC00; border-top: 0px solid black; /* Test/Debug, otherwise leave actual table border as 0px */ border-right: 0px solid black; /* Test/Debug, otherwise leave actual table border as 0px */ border-left: 0px solid black; /* Test/Debug, otherwise leave actual table border as 0px */ border-bottom: 0px solid black; /* Test/Debug, otherwise leave actual table border as 0px */ /* position:relative; */ } #main { margin: 0px; padding: 0px; width: 79.8%; /* #columnleft + #main + #columnright = 100% width, but take away 0.02% for the #main due to for some browser's inaccurate mathetical rendering, such as 100.1% or 100.2% which cause the Right Column to jump to the bottom, so 99.8 % total width is better as it make the browser's glitch not be that noticeable. Just add some background color to the #wrapper so that the color can match either the #main or #columnright */ height: 100%; /* Required by IE to inherit from wrapper (IE Hack) above */ background-color: #FFFFFF; border-top: 0px solid black; /* Test/Debug, otherwise leave actual table border as 0px */ border-right: 0px solid black; /* Test/Debug, otherwise leave actual table border as 0px */ border-left: 0px solid black; /* Test/Debug, otherwise leave actual table border as 0px */ border-bottom: 0px solid black; /* Test/Debug, otherwise leave actual table border as 0px */ /* position: relative; */ float: left; } #wrapper { margin: 0px; padding: 0px; width: 100%; height: 100%; /* min-height: 80%; */ /* Might not be needed, it's an IE Hack... */ background-color: #FF0000; border-top: 0px solid black; /* Test/Debug, otherwise leave actual table border as 0px */ border-right: 0px solid black; /* Test/Debug, otherwise leave actual table border as 0px */ border-left: 0px solid black; /* Test/Debug, otherwise leave actual table border as 0px */ border-bottom: 0px solid black; /* Test/Debug, otherwise leave actual table border as 0px */ /* position: relative; */ } /* IE Hack - Layout REQUIRES a height here to work */ /* * html #wrapper {height: 100%;} */ </style> </head> <body> <div id="header">Header Text</div> <div id="wrapper"> <div id="columnleft">Left Text</div> <div id="main">Center Content</div> <div id="columnright">Right Text</div> </div> <div id="clearfooter"></div> <div id="footer">Footer Text</div> </body> </html> Thanks, FletchSOD I am having a problem trying to get one column match the height of another. Within a large DIV box, I created two columns separated by about 20 px. I floated one to the left, then pushed one over to the right. Both boxes will expand depending on the amount of content, but I would like them to match the same height. The boxes will be used throughout the entire website, so it would not make sense to create a background image to try and trick it into being the same height.. or actually specifying the height. Is there any way to tell the left box to be the same height as the right box?? I tried to link to my site but it won't let a new member link to a website. My web page has a display bug in IE 5+ on Windows. Specifically, I have a DIV within which I wish to place two images. The two images are the same height and width, and I want to layer them (the top one is a PNG with transparency, but I have already solved that problem, this is a positioning problem) exactly on top of each other. I have done this by positioning them relatively within the DIV. The first image is top:0;left:0 and the second is top:-150;left:0 (the images are 150 px tall). They layer fine, but the DIV is twice the height (as if the second image were still following the first, making he DIV 300 px tall). I have tried many things and am stumped. Here is the site: URL Here is the relevant CSS: Code: #bannerPhoto { border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #000000; height: 150px; width: 750px; } #bannerPic { position: relative; z-index: 1; left: 0px; top: 0px; } #bannerText { position: relative; z-index: 2; left: 0px; top: -150px; } And the HTML: Code: <div id="bannerPhoto"> <div id="bannerPic"><img src="../images/bannerPhotos/image.jpg" height="150" width="750" /></div> <div id="bannerText"><img src="../images/text-cover.png" height="150" width="750" /></div> </div> Anyone? Thanks, Denver. Does anyone know how to set the height so it's 100% of the page size? Setting "height: 100%" doesn't seem to work. Thanks! #bottomLeft { position: absolute; height: 100%; padding: 0; margin: 0; width: 175px; } Hi, I'm working on my homepage at www.wecook.co.uk and want the grey background to at least be big enough to fill the whole page on most resoultions - currently on my monitor (1280 x 1024) it ends and i get a white at the bottom of the page - could someone suggest how i can adjust my css to fix this? any help is appreciated. thanks If you take a look here http://www.challengeyourdiet.com/login you may notice that the page does not go all the way down on big screens. I would like my footer to automatically fall to the bottom of the page no matter what screen size someone has. Any ideas? Thanks! |