CSS - Two Column Layout Inheriting Wrapper Bg Help
Currently, my site is setup like this:
Code: #wrapper { margin: 0 auto 15px auto; width: 900px; border: solid 1px #999; border-width: 0 1px 1px 1px; overflow: hidden; background: #fff #left { float: left; width: 200px; margin: 0; font-size: 75%; } #right { float: left; width: 698px; margin: 0; font-size: 80%; } Now I know that I didn't define a background for the #left or #right div, but that is because that is a direct copy and paste of how I currently have it setup since even if I do insert a background color they don't apply. The wrapper's white background seems to overwrite a defined background for the #left and #right. The issue is that the #left is my navigation to which I've colored dark gray (#999). I don't mind if the #right stays white because that is where I place the content of the site. The issue here is when the navigation ends in #left it shows the white beneath the links, which is ugly. I'd like for the dark gray to extend the length of the page filling in the width of the column. I thought I found a "workaround" but not really. I set the wrapper background to #999 which works great when the content on the #right is longer than the navigation inside the #left, but when the #right is shorter the column ends significantly shorter in length and then shows the #999 color beneath where the content ends. I've even tried defining no background in the wrapper (which wouldn't be good anyhow because my body background is a gradient) and even then the #left and #right divs wouldn't take a background color. Help please! Thanks in advance, Michael Similar TutorialsI 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 Question title: A 2 column layout, let only the second column scroll horizontally and let them both scroll vertically Hello I did try several idea's, but all failed. Then I did search the web but found a list of > 400.000 in google. If someone is willing to tell me if it is possible and give me some directions, please do. Everything is welcome. I got a list with 3 columns ( basically you could say I have only two columns because 2-3 could be concatenated to together, but they have a different style and justification, but I could live to start with a two column sample) f.e line 1 : value_one - ( some_text - value_two (right justified) ) line 2 : value_one - ( some_text - value_two (right justified) ) line 99:.... e.t.c Column one has a fixed width of 32px. 'some text' can be longer then the wide available and value_two is with 3 spaces appended to column 2. I want that column one is fixed horizontal and that the second and the third column can scroll horizontally. Of course when there are more line's then the height of the container is should be posable to scroll vertically. Finally I need the color behind column one be different then the column 2 and 3. So what I did create is a container with two containers where the left one has a different colour then the right one and above those a container with the list. I have overflow on auto, so I get scroll-bars when necessarily. But my problem is that when I scroll horizontally that my first column scrolls away to the left. Basically my question is. How can I get a 2 column layout, let only the second column scroll horizontally ( first is locked in horizontal place ) and let them scroll both vertically? Hey, So I have a three column layout being implemented as such: html: Code: <div class="content"> <div class="col1 column"></div> <div class="col3 column"></div> <div class="col2 column"> <div class="header">Header</div> </div> </div> CSS: Code: .column { padding: 10px; position:relative; } .header { background:#cfe6f5; color:#416383; font-size:11px; font-family:Arial; font-weight:300; padding-left:15px; } .col1 { float: left; width:250px; } .col2 { margin-left: auto; margin-right: auto; } .col3 { float:right; width:250px; } The problem is that the width of the header div extends all the way to the left and right of the page when it's in the middle column, but behaves the way I want it to (extends to the left and right of the column) when it's in the left or right column. Any ideas? Thanks. --Surgery Hello, I am having difficulty with the center column on the following page: http://cbo4edu.org/index2.html I want to widen the center column so that the CBO NEWS heading touches the blue line which divides the center and right column. When I try to add width to the style sheet the left column moves out of alignment. Any help is much appreciated, thanks! I am working on the new home page which is based on a template. The left sideColumn is working fine, however I am having a few problems with the mainColumn layout. Here is a static image to show what I want it to look like Here are the problems I am having: 1) The #scroll box is place where I want it in IE but in foxfire it is right up against the left side of the #sideColumn partially hidden. There will be text that scrolls into this box and stops. I haven't started on the part yet - in case that makes a difference. Not my choice, but that is what the bosses want. 2) I want the image centered horizontal within the #mainColumn. Here is what I have for the css: #home img { margin: 5px auto 5px auto; } which I thought would do the trick, but it's not. 3) I want the p text to have a 40px margin on the right and left side like the .large does. Here is what I have for the css: #home p, .large { margin: auto 40px auto 40px; } It works for the .large (Welcome to Vitalograph), but not for the text below it. At one point I had it working, but after addtional changes fixing other problems, now it doesn't and I can't figure out why. Here is the xhtml starting at the 2 column part (wrapper): Code: <!--begin wrapper--> <div id="wrapper"> <!--begin side column --> <div id="sideColumn"> <span class="category">Products</span> <ul> <li><a href="/products/spirometers.html">Spirometers</a></li> <li><a href="/products/clinical_trials.html">Clinical Trials</a></li> <li><a href="/products/asthma_copd.html">Asthma & COPD</a></li> <li><a href="/products/smoking_cessation.html">Smoking Cessation</a></li> <li><a href="/products/resuscitaion.html">Resuscitation</a></li> </ul> <span class="category">Resources</span> <ul> <li><a href="/resources/contact_us.html">Customer Support</a></li> <li><a href="/resources/training_services.html">Training & Services</a></li> <li><a href="/resources/exhibitions.html">Exhibitions</a></li> <li><a href="/resources/newsletters.html">Newsletters</a></li> <li><a href="/resources/downloads.html">Downloads</a></li> <li><a href="/resources/useful_links.html">Useful Links</a></li> <li><a href="/resources/industry_information.html">Industry Information</a></li> <li><a href="/resources/industry_information.html">Sitemap</a></li> </ul> </div> <!--end of side column --> <!--begin main column --> <div id="mainColumn"> <!-- InstanceBeginEditable name="Main_Section" --> <div id="home"> <div id="scroll"><span>scrolling news will go hear and stop</span></div> <img src="/images/boys_bubbles.gif" width="485" height="333" alt="boys and bubbles" /> <span class="large">Welcome to Vitalograph</span> <p>Vitalgraph offers a wide range of spirometers along with other asthma management equipment with over 40 years experience. From simple hand-held units to sophisticated Windows based spirometry systems, we have it all. Check out our full line of respiratory equipment under the product category.</p> <p><a href="/about_us/about_us.html">more about us...</a></p> </div> <!-- InstanceEndEditable --> </div> <!--end of main column --> </div> <!--end of wrapper--> Here is the vitalograph_master.css: Code: body { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 12px; text-align: center; background-color: #ffffff; color: #515151; margin:0px; padding:10px; } /*page container settings*/ #page { width: 750px; height: 600px; border: 1px solid #5094F9; background-color: #FFFFFF; overflow: hidden; margin: auto; padding: 10px 10px 10px 10px; text-align: left; } /*logo header and tag settings*/ #header { margin: 0; padding-bottom: 5px; width: 450px; height: 36px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: #5094F9; text-align: left; } #header img { vertical-align: -7px; } .tagline { color: #5094F9; font-size: 16; font-style: italic; font-weight: bold; display: inline; clear: both; line-height: 20px; margin-left: 10px; } /*top bar settings*/ #topbar { float: top; height: 20px; background-color: #5094f9; clear: both; padding-left: 10px; text-align: left; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: #FFFFFF; font-size: 12px; font-weight: bold; } #topbar a:link, #topbar a:visited { background-color: inherit; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-decoration: none; color: #FFFFFF; font-size: 12px; font-weight: bold; } #topbar a:hover, #topbar a:active { background-color: #FFFFFF; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-decoration: none; color: #5094F9; font-size: 12px; font-weight: bold; } #topbar ul { list-style: none; margin: 0; padding-top: 2px; } #topbar li { display: inline; margin-right: 160px; } /*Main Section two columns under top section*/ #wrapper{ padding: 10px 10px 10px 0px; width: 100%; height: 100%; } #sideColumn { float:left; width:155px; height: 78%; background-color: #5094F9; padding-top: 50px; padding-left:10px; padding-bottom:10px; pading-right: 10px; margin-right: 10px; text-align: left; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: #FFFFFF; font-weight: bold; line-height: 20px; } .category { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: #FFFFFF; font-size: 16px; font-weight: bold; letter-spacing: 5px; } #sideColumn a:link, #sideColumn a:visited { background-color: inherit; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-decoration: none; color: #FFFFFF; font-size: 12px; font-weight: bold; } #sideColumn a:hover, #sideColumn a:active { background-color: #FFFFFF; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-decoration: none; color: #5094F9; font-size: 12px; font-weight: bold; } #sideColumn ul { list-style: none; padding: 15px 0px 15px 10px; margin: 0px; } #mainColumn { padding: 0px; } /*footer*/ .footer { font-family: "Times New Roman", Times, serif; font-size: 9px; color: #999999; } /*text*/ .large { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: #5094F9; font-size: 18px; font-weight: bold; margin-bottom: 15px; } Here is the home.css: Code: /*home page*/ #home { margin: auto; } #home img { margin: 5px auto 5px auto; } #home p, .large { margin: auto 40px auto 40px; } #home a:link, #home a:visited { background-color: inherit; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-decoration: none; color: #5094F9; font-size: 12px; font-weight: bold; } #home a:hover, #home a:active { background-color: inherit; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-decoration: none; color: #990099; font-size: 12px; font-weight: bold; } #scroll { width: 560px; padding: 5px; background-color: inherit; border: 1px solid #5094F9; margin-bottom: 5px; } Any help or suggestions are greatly appreciated. I am a HTML&CSS novice - I am trying to write a page using a three column layout but the column colour doesn't reach the footer. I understand that this is a common problem and I've looked at a lot of examples on the web of how to work around this or create a better layout but I'm still not sure enough to know which would be the easiest and best to go within the page I have written. I want to avoid images but other than that any help would be great! I have validated the HTML & CSS and they are copied below (could any advice be really specific, as I said this is very new to me!). Thanks HTML: <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Drivers Jonas Information Unit</title> <meta name="keywords" content="1" /> <link rel="stylesheet" type="text/css" href="djiucss.css" media="screen" /> <link rel="stylesheet" type="text/css" href="djiuprintcss.css" media="print" /> </head> <body> <div id="top"> <div id="picture"> <img src="GIF.gif" alt="DJ" width="200" height="100" /> </div> <div id="heading"> <div id="title"><h1>Drivers Jonas Information Unit</h1></div> </div> </div> <div id="left"> <br/><p><a href="about.html">About us</a></p><br/> <p><a href="company.html">Company Information</a></p><br/> <p><a href="legal.html">Legal information</a></p><br/> <p><a href="landreg.html">Land Registry</a></p><br/> <p><a href="research.html">Research</a></p><br/> </div> <div id="right"> <div id="title"><h2> News </h2></div> <ul> <li>The Information Unit has recently acquired a set of new APC guides</li> <li>If you would like any training on databases</li> <li>The Information Unit has created an economy timeline </li> </ul> </div> <div id="main"> <div id="title"><h2>Main stuff</h2></div> <p>Suspendisse adipiscing malesuada lectus. Cras vitae dolor. Donec consequat, lectus sed euismod consequat, ipsum mi mollis nunc, eget nonummy neque purus a tortor. Ut vel lorem. Curabitur mollis mauris id diam. Nam posuere. In placerat sapien ut nisl. Donec volutpat augue ut velit. Proin nec mi sit amet metus placerat egestas. Quisque porttitor massa eu lacus. Donec tristique, neque in sollicitudin euismod, enim tellus varius mauris, id vestibulum est massa id massa. Integer et purus. Vivamus condimentum tincidunt ipsum. Duis augue lorem, pretium vel, cursus at, vulputate sed, neque. Quisque justo. Nunc rhoncus. In ornare venenatis velit. </p> <p>Donec facilisis ante sit amet mauris. Nunc fermentum orci eu quam. Donec vestibulum. Vestibulum ultricies nisl eu eros. Curabitur urna. Duis enim erat, lobortis nonummy, mollis non, porttitor nec, nisi. Phasellus pulvinar purus eu pede. In mollis. Duis sit amet dui et arcu rhoncus auctor. Integer est dui, pharetra vel, volutpat ac, luctus in, elit. </p> <p>Suspendisse adipiscing malesuada lectus. Cras vitae dolor. Donec consequat, lectus sed euismod consequat, ipsum mi mollis nunc, eget nonummy neque purus a tortor. Ut vel lorem. Curabitur mollis mauris id diam. Nam posuere. In placerat sapien ut nisl. Donec volutpat augue ut velit. Proin ne</p> </div> <div id="bottom"> Drivers Jonas Information Unit </div> </body> </html> CSS: #top /*DJ logo and page title - includes h1*/ { color: black; font-family: arial, sans-serif; font-size: 20px; background: #d31145; padding-bottom: 15px; } body { color: black; font-family: arial, sans-serif; font-size:14px } img /*DJ logo*/ { padding: 20px; float:left; } #heading { text-align: center; padding:20px; } /*main page title*/ /*should change all reds to DJ red: #d31145*/ #left, #right, #main { color: white; background: black; } #left { float: left; width:140px; border-right:2px solid #d31145; text-align:left; padding-left: 1em; } #right { float:right; width:140px; border-left:2px solid #d31145; text-align:left; padding-right: 1em; } #main { margin-left: 150px; margin-right: 150px; border-left: 1px solid; border-right: 1px solid; padding: 1em; } #bottom { clear:both; margin: 0; color:black; background: #d31145; font-size: 16px; font-family: Arial, sans-serif; text-align: center; } #title { text-align:center; } a:link {color:white} a:visited {color:silver} a:hover {color:#d31145} a:active {color:#d31145} Hi, http://www.dudley.nhs.uk/search.asp has a two column effect. The CSS for it is he http://www.dudley.nhs.uk/css/screen.css I was wondering why if there is a table in the right hand column with a width percentage over 77% there is some horizontal scrolling? This happens in IE. Any help would be greatly appreciated. Thanks. Janusz Jasinski Hello! I'm new to CSS, so any help would be greatly appreciated! I'm working on this page: sugarhooker[dot]com/testing/index2.html *The CSS is included in the head The right column is suppose to start where it says 'Are you hooked...' It should be right underneath the navigation bar. Anyone know what I'm doing wrong? Thanks in advance! I already have a site up and in progress here, but on the utilities page there I want project descriptions on the right and screenshots/links in the left. I want the code in logical order an not use absolute positioning since that will ruin the automatic vertical pagestretch and require fetching exact coordinates. Ultimately there will be self-managed divs. The text needs to be aligned left to the buttons and the left content centered in its 'area' If this doesn't make sense I can try to explain it better or answer questions here. Oh hey, no URLs allowed for me. Ha. Okay... members.allegro.cc/felix-the-ghost/Utilities.html ^site^ Dear all I would like to be able to create a design with a text column and an image column. The text would be continuous in the left-hand column, and images would be displayed in the right-hand column. In other words, I would like to be able to use the following HTML: Code: <p>blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah <img src="test.jpg" /> blah2 blah2 blah2 blah2 blah2 blah2 blah2 blah2 blah2 blah2 blah2 blah2 blah2.</p> I would like the text to appear continuously in the left-hand column, while the image appears at the correct point, but in the right-hand column. In other words, I would like the left-hand column (assuming I fixed its width) to contain the output: Code: blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah2 blah2 blah2 blah2 blah2 blah2 blah2 blah2 blah2 blah2 blah2 blah2 blah2. While the right-hand column will have the image, its top lining up with where the text changes to 'blah2'. Any ideas? I realize the most difficult thing about asking this question is describing the visual layout I want to achieve. I shall try to draw a mock-up, and post a link to it in this thread. Many thanks in advance, Tom Hello, I'm not new to the web, but a newbie in terms of CSS. Could someone check out the following page and css and let me know why the text is not being wrapped in the overall layout. In other words, why is it running over top of the page footer and not contained. http://www.brainfuelmedia.com/postscript/temp.html and the css is http://www.brainfuelmedia.com/postscript/ps_main.css Thanks for all help. This is driving me nuts. Well i am trying to have my directory script have 3 items per row. Currently using a horizontal list but as you can see from the below link it isn't work right. Wandering what the best way to do it would be? link -> http://www.gamingonlinux.info/category.php?cid=8 I am creating a website for a synagouge and I am having trouble aligning the third column to the right of the other two. What I have now is he http://www.getabb.com/help/index.htm I want the Blue box on the bottom of the text to be displayed to the right of the text in the Pinkish area. If somebody could show me how to do this, I would appreciate it. Right now the site is only displayed correctly in IE but I will fix that later. Thanks in advance Is it possible to transform the following structu Code: <div 1> <div 2><div 3><div 4> </div 1> to this visual effect: Code: | div 2 (20 px) | div 3 (auto-adjust width) | div 4 (20px) | Now there would probably not be a problem if we knew the all mighty general width of the <div1>, but we don't, and still we want it this scheme to behave like this: Code: <table width="dynamic"> <tr> <td width="20"></td><td>flexible here</td><td width="20"></td> </tr> </table> So is there some way to do it with divs and css? Hi, I'm trying to write a reasonably complex (I think) layout using CSS but I can't get it working. here is a mockup of what it should look like: http://andrew.estyles.com.au/site/sitelayout.gif I basically want the main content area to stretch to fit the content being displayed, and have the right column (in blue) to stretch the whole height of the page. The other three areas are a fixed width/height, although the bottom bar's position must change depending on how long the blue bar is (ie the bottom bar should always be inline with the bottom of the blue bar). Here's my attempt so far: http://andrew.estyles.com.au/site/test.html I can't get the bottom (red) bar to line up with the bottom of the blue bar. If I change the height of the content area, the blue bar does not move but the red bar does. This is the main problem. And also, the website does not display correctly in IE If someone could help me out with these issues I'd be grateful, thanks Hi all, I would like to create a 3 column layout with the left menu, right menu & the content to have the same height always independently which is the longest like this example below. Also I have attached the HTML & CSS for your reference. How can I do this in CSS please? Thanks in advance ziffa27 Example: http://www.pixy.cz/blogg/clanky/css-3col-layout/ 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> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <style type="text/css"> <!-- html, body { margin: 0; padding: 0; } body { background: silver; color: #000000; font-family: 'Arial, Helvetica, sans-serif'; font-size:11px; font-weight:normal; line-height:16px; text-align:left; } #container { background: yellow; margin: auto; padding: 0; width: 1000px; } #header { background: orange; margin: 0; padding: 0; height: 200px; } #left_menu { background: red; margin: 0; padding: 0; width: 200px; float: left; } #right_menu { background: blue; margin: 0; padding: 0; width: 300px; float: right; } #content { background: green; margin: 0; padding: 0; margin-left: 200px; width: 500px; } #footer { background: aqua; margin: 0; padding: 0; clear: both; height: 30px; } --> </style> </head> </head> <body> <div id="container"> <div id="header">Header</div> <div id="left_menu">Left menu</div> <div id="right_menu">Right menu</div> <div id="content">Content<br />Lorem ipsum dolor sit amet, est vitae ut. Risus amet illo mollitia magna erat voluptatem, adipiscing arcu eget cras eu nulla, quam eu nec orci, magna quisque nullam adipiscing integer suspendisse, vulputate hac id vivamus at sed mi. Pede magnis fringilla etiam, tempus vel vitae elementum sed nunc omnis. Praesent condimentum aliquam in eros et, pharetra nam imperdiet corrupti posuere, per suspendisse diam turpis parturient turpis, suscipit semper augue nulla, curabitur ac nisl. Iaculis tempor quam id morbi, sodales nullam nulla, ullamcorper tortor illum hendrerit, wisi fringilla ornare fames in, at ornare luctus eu officia platea.</div> <div id="footer">Footer</div> </div> </body> </html> I've seen a lot of guides that demonstrate how to make a pure CSS two column layout so that if you have two different background colors, the columns will be the same height no matter which column is taller. However, I'm trying to create a border around the columns and found that these tricks don't work for that. The border only shows up around the content itself. How can I make it so that the border around both columns is as tall as the tallest column? Okay, trying to use CSS to set up a simple three column layout. Here's what I would like: - An fixed, 800px wide column always centered horitontally, relative to browser window size - A collapsable left column and collapsable right column that fill out the page (these need to be seperate columns, technically, because I want to apply a different background image to each) I've done something like this before with "broken" code by doing something like... Code: <table width=100%> <tr> <td width=99%> </td> <td width=800> </td> <td width=99%> </td> </tr> </table> I know, this is really bad code. But hopefully it explains what I'm trying to do. Maybe someone can help me out using some simple CSS? Thanks! G'day again, Following on from my last post (as yet unanswered, see the Left and Right Image post below), I am still trying to complete the layout of my site using CSS and <div> tags. As can be seen in the pictu http://img241.imageshack.us/img241/...sitecopyfp2.jpg I have three columns underneath the headers. The width's of each column are fixed, but I want the heights to be the same, ie. that of the column with the most information, and the footer bar to be underneath. The current CSS for the column sections: Code: #LeftCol { position: absolute; top: 360px; left: 75px; background-color: #a8b0b3; width: 157px; height: auto; } #CentreCol { position: absolute; top: 360px; left: 232px; background-color: #ffffff; width: 536px; height: auto; } #RightCol { position: absolute; top: 360px; left: 768px; background-color: #a8b0b3; width: 157px; height: auto; } and the HTML for the columns: Code: <div id="LeftCol"> blah blah blah </div> <div id="CentreCol"> blah blah blah </div> <div id="RightCol"> blah blah blah </div> I'd appreciate any help. Cheers. I have a three column layout currently. The left and right column contain borders to the central column where all of the website content is planned to be. The problem that I have is that I do not want the left and right border columns to be in the windows scrollable area. For example, If someone views the site using an 1024x768 resolution, the page currently loads with a scroll bar at the bottom. To be able to see all of the central column, you have to scroll over slightly. If the right and left column were not in the scrollable area, the middle column would be 100% visible on load and also you would be able to see half of the right and left border. Any help would be greatly appreciated. I understand that what I am asking for is not that clear and any problems please say and I can draw a diagram. Cheers |