CSS - Fixed Width Table Column With One Column Spanning The Rest
Hi
I am trying to make a table to display some stuff within a fix sized window. I want to have 5 columns of fixed width and one column that spans the rest of the remaining space. The Idea is to allow the widths of the first 5 columns to be changed by a script and having the last one adapting as needed... html Code: Original - html Code <div class="container"><table cellspacing="0"> <colgroup> <col width="40" /> <col width="220" /> <col width="120" /> <col width="65" /> <col width="40" /> </colgroup> <thead> <tr> <th>A</th> <th>B</th> <th>C</th> <th>D</th> <th>E</th> <th style="width: 100%;></th> </tr> </thead> <tbody> <tr> <td>1</td> <td>2</td> <td>3</td> <td>4</td> <td>5</td> <td style="width: 100%;></td> </tr> </tbody> </table></div> <div class="container"><table cellspacing="0"> <colgroup> <col width="40" /> <col width="220" /> <col width="120" /> <col width="65" /> <col width="40" /> </colgroup> <thead> <tr> <th>A</th> <th>B</th> <th>C</th> <th>D</th> <th>E</th> <th style="width: 100%;></th> </tr> </thead> <tbody> <tr> <td>1</td> <td>2</td> <td>3</td> <td>4</td> <td>5</td> <td style="width: 100%;></td> </tr> </tbody> </table></div> css Code: Original - css Code div.container { height: 400px; width: 800px; overflow: scroll; } table { width: 100%; } td { border-style: solid; border-color: silver; border-width: 0px; padding: 1px 3px; } th { border-style: outset; border-color: silver; border-width: 2px; background: silver; padding: 1px 3px; }
It really does fill the entire space but the last column crushes all the other into their minimal width resulting in linebreaks between words inside the cells... Please help me Similar TutorialsHello all, I am implementing a 2 column fixed width template. The problem is that the smaller column does not stretch to match the height of the taller column. All of the online templates I have found remedy this problem by setting a 1 px high background image to span the width of the container div. My problem is that I would like to place an image at the top and bottom of the smaller column. How can I achieve this? Currently I have 2 fixed columns and a fluid center column. When I resize the window horizontally I want the columns to stay fixed until the center column will begin to overlap the side columns, at which point I'd like the side columns to begin fluidly squashing to accommodate. Is it possible to do this? Only thing I know of is max-width, but I'm not sure if that's correct as I've never used it before. Any help would be VERY appreciated guys, as I need to know this quite soon. -Luke I need a combination of this: http://bonrouge.com/3c-hf-fixed.php and this: http://bonrouge.com/3c-hf-fluid.php I need the middle column to be a fixed width and the outer two to be fluid. I also need to maintain the 100% with header and footer at top and bottom respectively. Any ideas how to do this? Thanks. Hi all, I'm trying to achieve the following: <div id="left">This column is of blue background, and stretches all the way to the left.</div> <div id="center"> THIS COLUMN IS FIXED WIDTH, 760px </div> <div id="right">This column is of red background, and stretches all the way to the right.</div> Hope that is self explanatory.. I've Googled all this but can only find solutions for fluid "center" columns with fixed width right/left columns. I'm trying to do the opposite. Could anyone let me know how I can do this? I've got some messy CSS that definitely needs to be corrected, I'm trying out different things so here's my 'trial& error' code: Code: #left { background-color: blue; float: left; margin: auto; position: absolute; } #center { background: #DFDFEB url(../images/body/top.jpg) no-repeat; width: 760px; margin: 0 auto; } #right { background-color: red; } Thanks in advance! Hello all, Perhaps it is just because I've been working all day but I cannot remember how to do this. My site is http://www.geocities.com/lokisapocalypse/debug/index.html . I almost have it set up the way I want it but how do I get the three columns to all be the same height? 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! Hello, (please also see attached/uploaded style sheet) I'm puzzled why (in the following code) the TEST #2 table renders as required (i.e. 2 rows in 1 column, all with the same cell WIDTH) but the table in TEST #1 seems to render the table cells (i.e. 2 columns in 1 row) without a common cell WIDTH. How can I get all the cells (there are plenty more!) in table TEST #1 to all be exactly the same width (preferably 85px)? Code: <link rel="stylesheet" type="text/css" href="http://thinet/cgi-bin/thinetStyleSheet.css"> TEST #1 <table class="menu" border=1 CELLPADDING=2> <tr> <td class="pinkButtons"><a title="Treats menu" href='http://thinet/theread/forumdisplay.php?s=&forumid=82'>Treats</a></td> <td class="pinkButtons"><a title="New Starters, Leavers and Transfers" href='http://thinet/theread/forumdisplay.php?s=&forumid=41'>Joiners etc.</a></td> </tr> </table> <P> TEST #2 <table class="menu" border=1 CELLPADDING=2> <tr><td class="pinkButtons"><a title="Treats menu" href='http://thinet/theread/forumdisplay.php?s=&forumid=82'>Treats</a></td></tr> <tr><td class="pinkButtons"><a title="New Starters, Leavers and Transfers" href='http://thinet/theread/forumdisplay.php?s=&forumid=41'>Joiners etc.</a></td></tr> </table> I don't think I've quite grasped the idea of CSS yet?!?! Any help/pointers would be appreciated. Thanks, Andy Hi, I'm wondering how do you make two divs next to each other, in line with each other, but have one to the left be a set width, and the one on the right be everything else that is left (changes as the user scales the browser). Here is an example: ( -100px- )( ---------everything else that is left---------- ) (more stuff can go here now) I'm having trouble having one float: left and width: 100px, the other float: right and width: 100% (I think this part is the problem). 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 I saw an idea that I liked a whole lot for displaying pictures and that kind of thing. I didn't want to really hank the guys code, but tried to make my own version of it. The problem I have is yet again with Internet Explorer doing really stupid things with the pics I drop in my div's. It keeps adding a padding to it and it's beginning to aggravate me. Here is the code I had: body { height: 100%; margin: 0; padding: 0; background: #4F6A84; text-align: center; } #super_container { position: absolute; top: 70px; left: 0; width: 100%; height: 438px; background: #424242; padding: 0; margin: 0 auto; text-align: center; } #super_container { height: 438px; } #sub_container { width:775px; voice-family: "\"}\""; voice-family: inherit; width: 765px; /*border-right: 1px solid #7D1E2C; border-left: 1px solid #7D1E2C;*/ height: 438px; background: transparent; margin: 0 auto; } #sub_container { width: 765px;} #right{ float: right; width: 150px; height: 438px; background: #c5c5c5; } #left { float: left; width: 400px; height: 438px; margin: 0px; padding: 0px; background: blue; overflow:visisble; background-image:url(new_test/test1.jpg); background-repeat:no-repeat; background-position:top left; } #left img { padding: 0px; margin: 0px; border: 5px solid #fff;} #center { margin-left: 401px; margin-right:151px; padding:0px 0px 0px 0px; border-top:1px solid green; } and the html <body> <div id="super_container"><!--start of super container--> <div id="sub_container"><!--start sub_container--> <div id="right"> </div> <div id="left"> </div> <div id="center"> test </div> </div><!--end sub_container--> </div><!---end of super conatiner--> </body> the problem becomes evident when I put an image in the htnl of the left element. It either looks likeit rises just above the top of the super-container, or it is flush with the top and leaves a margin underneath it. As always, any help or design/tips as to what I am doing wrong would be great. I am just experimenting with new things, trying to see what I can or cannot do. The idea would be to have a home page with picture and right column with info. Then on the sub-pages have nav and subnav on the middle and right columns and pics on the left. Just a dry run, trying to see where i am. Thanks for the help in advance! jon Hello, I created a 3 column layout with header and footer: http://www.27lamps.com/public/layout.htm The problems I have a 1. I am not able to extend my 3 columns so they have the same height. How can I do this? Do I need to use images somehow? I would prefer to use CSS only if possible. 2. I am not able to use padding in my columns without breaking the design. Could someone, please, help me fixing this problem and also improve my code? Thanks, Miguel Having coded using tables for the past 5 years, I'm coding my first site using pure CSS (hold back the laughter) ... I'm new to change. In any case ... I'm attempting to setup a homepage that has a fixed width and height. So far I've got a one-column header working fine. Beneath the one-column header I wish to have three columns with--dare I say it Web 2.0ish rounded corner cells--However the caveat is that these three cells need to all be a fixed height to go along with the page design. After two days of research, coffee, banging my head against my desk, I haven't been able to figure this one out. I am using an image at the top of each cell and an image at the bottom of each cell, but cannot get the cells to maintain a specific height. Any help would be appreciated: CSS: Code: /*<agl.folder "general">*/ body { color: #000; font 76%/1.5em "Lucida Grande", Verdana, Geneva, Helvetica, sans-serif; margin: 0; padding: 0; } .footer { color: #7f7f7f; font-size: 12px; font-family: Helvetica, Geneva, Arial, SunSans-Regular, sans-serif; text-decoration: none; text-align: center; } .footer a:link { color: #7f7f7f; font-size: 12px; font-family: Helvetica, Geneva, Arial, SunSans-Regular, sans-serif; text-decoration: none; text-align: center; } .footer a:visited { color: #7f7f7f; font-size: 12px; font-family: Helvetica, Geneva, Arial, SunSans-Regular, sans-serif; text-decoration: none; text-align: center; } .footer a:hover { color: #8da7fb; font-size: 12px; font-family: Helvetica, Geneva, Arial, SunSans-Regular, sans-serif; text-decoration: none; text-align: center; } .user_links a:link { color: #7f7f7f; font-size: 14px; font-family: Helvetica, Geneva, Arial, SunSans-Regular, sans-serif; text-decoration: none; } .user_links a:visited { color: #7f7f7f; font-size: 14px; font-family: Helvetica, Geneva, Arial, SunSans-Regular, sans-serif; text-decoration: none; } .user_links a:hover { color: #8da7fb; font-size: 14px; font-family: Helvetica, Geneva, Arial, SunSans-Regular, sans-serif; text-decoration: none; } .text { color: #000; font-size: 12px; font-family: Helvetica, Geneva, Arial, SunSans-Regular, sans-serif; text-decoration: none; } .text a:link { color: #7f7f7f; font-size: 12px; font-family: Helvetica, Geneva, Arial, SunSans-Regular, sans-serif; text-decoration: none; } .text a:visited { color: #7f7f7f; font-size: 12px; font-family: Helvetica, Geneva, Arial, SunSans-Regular, sans-serif; text-decoration: none; } .text a:hover { color: #8da7fb; font-size: 12px; font-family: Helvetica, Geneva, Arial, SunSans-Regular, sans-serif; text-decoration: none; } a:link { color: #7f7f7f; text-decoration: none; } a:visited { color: #7f7f7f; } a:hover { color: #8da7fb; text-decoration: none; } /*</agl.folder>*/ #frame { width: 965px; margin: 0 auto; } #header { background-color: #fff; max-width: 965px; margin-top: 10px; } #content { position: relative; max-width: 965px; height: 200px; } #footer { background-color: #fff; position: absolute; top: 265px; width: 965px; } /*<agl.folder "box">*/ #portfolio { position: absolute; left: 0px; top: 0px; width: 475px; height: 200px; } .portbox { background-color: #ffffff; border: solid 1px #b6b6b6; padding: 4px; } .portbox:before { content: url(../images/homepage/portfolio.png); display: block; line-height: 0.1; margin: -5px -5px -5px; } .portbox:after{ content: url(../images/homepage/portfolio_bottom.png); display: block; line-height: 0.1; margin: -5px -5px -5px; } /*</agl.folder>*/ /*<agl.folder "methodologies">*/ #methodology { position: absolute; left: 482px; top: 0; width: 237px; height: 200px; } .methbox { background-color: #ffffff; max-height: 200px; border: solid 1px #b6b6b6; padding: 4px; } .methbox:before { content: url(../images/homepage/methodology.png); display: block; line-height: 0.1; margin: -5px -5px -5px; } .methbox:after{ height: 200px; content: url(../images/homepage/meth_bottom.png); display: table-row; margin: -5px; } /*</agl.folder>*/ /*<agl.folder "design">*/ #design { position: absolute; left: 726px; top: 0px; width: 235px; height: 125px; } .designbox { background-color: #ffffff; border: 1px solid #b6b6b6; padding: 4px; } .designbox:before { content: url(../images/homepage/design.png); display: block; line-height: 0.1; margin: -5px -5px -5px; } .designbox:after{ content: url(../images/homepage/design_bottom.png); display: block; line-height: 0.1; margin: -5px -5px -5px; } /*</agl.folder>*/ /*<agl.folder "solutions">*/ #solutions { position: absolute; left: 726px; top: 135px; width: 235px; height: 125px; } .solutionsbox { background-color: #ffffff; border: 1px solid #b6b6b6; padding: 4px; } .solutionsbox:before { content: url(../images/homepage/solutions.png); display: block; line-height: 0.1; margin: -5px -5px -5px; } .solutionsbox:after{ content: url(../images/homepage/design_bottom.png); display: block; line-height: 0.1; margin: -5px -5px -5px; } /*</agl.folder>*/ h2 { font-size: 1.5em; font-weight: bold; } 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> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> <title>Test CSS</title> <link href="css/home_layout.css" rel="stylesheet" type="text/css" media="all" /> </head> <body> <div id="frame"> <div id="header"> <p align="right"><span class="user_links"><a href="(EmptyReference!)">Login</a> | <a href="(EmptyReference!)">Register</a> | <a href="(EmptyReference!)">Contact</a></span></p> <img src="images/tabs.jpg" alt="" height="43" width="965" border="0" vspace="3" livesrc="images/tabs.psd" /><img src="images/homepage/flash_header.jpg" alt="" height="275" width="965" border="0" vspace="5"/><br /> </div> <div id="content"> <div id="portfolio"> <div class="portbox"> <p align="center"><img src="images/homepage/screenshots.jpg" usemap="#screenshotsc1fd8d76" livesrc="images/homepage/screenshots.psd" alt="" height="137" width="426" / border="0"><map name="screenshotsc1fd8d76"><area shape="rect" coords="290,9,418,129" href="http://www.pilatesmovementnyc.com" alt="Fitness Center Pilates New York City" target="_blank" /><area shape="rect" coords="146,9,281,129" href="http://www.emmestyle.com" alt="Emme Super Model" target="_blank" /><area title="Healthy Living NYC" shape="rect" coords="3,11,130,132" href="http://www.healthylivingnyc.com" alt="Healty Lliving NYC" target="_blank" /></map></p> </div> </div> <div id="methodology"> <div class="methbox"> <p><img src="(EmptyReference!)" alt="" height="36" width="36" align="left" border="0" csnew="csnew" cssot="ps" livesrc="(EmptyReference!)" /><span class="text">Step one is the first step in this whole thing ok. so don't start yet until you know what the first step is</span><br /> <img src="(EmptyReference!)" alt="" height="36" width="36" align="left" border="0" csnew="csnew" cssot="ps" livesrc="(EmptyReference!)" /><span class="text">Step one is the first step in this whole thing ok. so don't start yet until you know what the first step is</span><br /> <img src="(EmptyReference!)" alt="" height="36" width="36" align="left" border="0" csnew="csnew" cssot="ps" livesrc="(EmptyReference!)" /><span class="text">Step one is the first step in this whole thing ok. so don't start yet until you know what the first step i</span>s<br /> <img src="(EmptyReference!)" alt="" height="36" width="36" align="left" border="0" csnew="csnew" cssot="ps" livesrc="(EmptyReference!)" /><span class="text">Step one is the first step in this whole thing ok. so don't start yet until you know what the first step is</span></p> </div> </div> <div id="design"> <div class="designbox"> <p></p> </div> </div> <div id="solutions"> <div class="solutionsbox"> <p></p> </div> </div> <div id="footer"> <div class="footer"> <a href="(EmptyReference!)">Home</a> | <a href="(EmptyReference!)">Portfolio</a> | <a href="(EmptyReference!)">Web</a> | <a href="(EmptyReference!)">Marketing</a> | <a href="(EmptyReference!)">Advertising</a> | <a href="(EmptyReference!)">Identity</a> | <a href="(EmptyReference!)">Hosting</a> | <a href="(EmptyReference!)">Profile</a><br> <a href="(EmptyReference!)">Design</a> | <a href="(EmptyReference!)">Technology</a> | <a href="(EmptyReference!)">Business Solutions</a><br> <a href="(EmptyReference!)">Contact Us</a> | L<a href="(EmptyReference!)">ogin to Your Account</a><br> Copyright 2007 Website Development Enterprises, LLc </div> </div> </div> </div> </body> </html> Hi guys, This is another standard "why won't it work in IE"-post. I'm making a multi-column news-style site (<spam>first link in my signature</spam>), and IE screws up the widths. The layout is basically three .col's which are floated left, and a #menu on the right. Here's the relevant css: Code: #menu { float: left; margin-left: 0%; width: 20%; line-height: 120%; padding: 2%; font-size: larger; } .col { float: left; width: 24%; font-size: 0.8em; } .col ul{ list-style-type: none; padding-left: 0; } .col .story{ background: #F5F8ED; padding: 0 ; margin: 1%; border: 1px solid #71804D; color: #333; text-align: justify; } Here's some example html: Code: <div class="col"> <ul> <li class="story"> <p class="story_title"> story title </p> <div class="story_body"> <p>blah blah</p> </div> <div class="sub"> <p>stuff</p> </div> </li> </ul> </div> <div class="col"> <ul> <li class="story"> <p class="story_title"> story title </p> <div class="story_body"> <p>blah blah</p> </div> <div class="sub"> <p>stuff</p> </div> </li> </ul> </div> <div class="col"> <ul> <li class="story"> <p class="story_title"> story title </p> <div class="story_body"> <p>blah blah</p> </div> <div class="sub"> <p>stuff</p> </div> </li> </ul> </div> <div id="menu"> <div id="menu_title"> <h1> title </h1> </div> <ul id="navbox"> <li> ... </li> </ul> ... etc </div> The problem is that IE renders the .col's very narrowly, and has some major space vertically between them. This means that #menu gets pushed down below the .col's. Can anyone point me in the right direction to fix this width issue? Thanks, Simon I've been designing a template for my phpBB install to make it integrate with my site better, and what I have so far I like, but I noticed one small problem. I'm not sure if it's a bug in mozilla or what the cause is, but at random times my Author details column will take up 100% of the screen with, when it's defined via css to only take up 12%. A simple reload is all that is required to fix it, but it can be quite annoying when it happens. The problem only seems to happen on the post view, which is available he http://kicken.mine.nu:8008/forums/viewtopic.php?t=4 It seems I have more luck getting it to happen if I start clicking around between the Home page and the post view, or from the index to a post view. I havn't had access to any browser other than mozilla to check things in either, so I'm not sure what results will show in other browsers. I'm attempting to get a page that has a header, footer, left navigation bar with a fixed width, with a right "fluid" content section. I can get it to work by giving the main content a "margin-left" of the width of the navigation panel, and absolutely positioning the navigation. Problem is, with the navigation being absolutely positioned, it takes it out of the flow and doesn't push the container to fit its contents. I've trying playing with using floated divs, which is I'm sure the way I'll have to go, but I want the navigation bar to always be a fixed width of 175px, and I want the content section to stretch to fill the remaining space. I'd also like to make sure the content portion appears BEFORE the navigation panel in the order it appears on the HTML for SEO purposes. I'm sure it's easy using Javascript, but I'd like to do a pure CSS solution, if possible. How do I do that? Here is the link if you want to have a look: http://www.chcs-ut.com/support.php?section=technical Hi all, I've tried searching around for this issue, but I've not found any help so far and it's driving me nuts. I hope someone here can advise. This is an abridged version of the site's code for example: Code: <style type="text/css"> <!-- #main1 { padding: 0px; margin: 0px; } #left { width:260px; margin:0; padding:0; float: left; } #left-top { background-image: url(../images/panel-top-left.gif); background-repeat: no-repeat; background-position: center top; height: 16px; margin: 0px; padding: 0px; } #left-middle { background-image: url(../images/panel-middle-left.gif); background-repeat: repeat-y; padding-right: 20px; padding-left: 20px; padding-bottom: 2px; } #left-bottom { background-image: url(../images/panel-bottom-left.gif); background-position: center; height: 18px; } #logo { background-image: url(../images/swalingslogo.gif); background-position: center top; width: 260px; height: 120px; background-repeat: no-repeat; } /* Navigation List */ #navlist { padding-left: 0; margin-bottom:10px; width: 217px; } #navlist li { list-style: none; margin-bottom:4px; padding: 0; font-size:1.2em; line-height:1.8em; width:217px; height:32px; background-image:url(../images/nav2.gif); background-repeat:no-repeat; margin-top: 0; margin-right: 0; margin-left: 0; } #navlist li a:link, #navlist li a:visited { display:block; text-decoration: none; color:#039; width:207px; height:32px; font-weight:bold; padding-top: 2px; padding-right: 5px; padding-bottom: 2px; padding-left: 5px; } #navlist li a:hover { text-decoration: none; color:#FF6600; } /* Testimonials */ div#fscroller { width:200px; height:200px; background-image:url(../images/bg-testimonials.gif); background-repeat:no-repeat; margin-left:8px; } div#fscroller p { margin-left: 10px; margin-right: 10px; margin-top: 10px; margin-bottom: 5px; } /* Middle Column */ #middle { margin-top: 0; margin-right: 0px; margin-bottom: 0; padding-right: 0px; padding-left: 0px; padding-top: 0px; text-align: justify; margin-left: 260px; } #middle #top-left { background-image: url(../images/panel-top-rightleft.gif); height: 16px; font-size: 2px; background-repeat: no-repeat; } #middle #top-right { float: right; margin-top: -16px; background-image: url(../images/panel-top-rightright.gif); height: 16px; width: 20px; font-size: 2px; } #middle a { color: #003399; } #middle a:hover { text-decoration: none; } /** Country Titles **/ #middle h2#unitedkingdom { background-image: url(../images/title-unitedkingdom.gif); background-repeat: no-repeat; height: 26px; width: 201px; margin-bottom: 6px; } #middle h2#antigua { background-image: url(../images/title-antigua.gif); background-repeat: no-repeat; height: 26px; width: 128px; margin-top: 16px; margin-bottom: 6px; } /* Minisite Links */ div.minisite { float: left; } div.minisite span { display: none; } div.minisite a { background-position: top; background-repeat: no-repeat; height: 168px; width: 190px; display: block; } div.minisite a:hover { background-position: bottom; } a#minisite-swimminglessons { background-image: url(../images/swimming-lessons-uk.jpg); } .clear { clear:both; } .hidden { display: none; } .notopgap { margin-top: 0; } .nobottomgap { margin-bottom: 0; } .inside { background: #EFEFEF; padding-left: 10px; padding-right: 10px; } --> </style> <div id="main1"> <div id="left"> <!-- Logo --> <div id="logo"></div> <div id="left-top"></div> <div id="left-middle"> <!-- Navigation --> <!--#include file="../inc/nav2.asp" --> <!-- Testimonials --> <!--#include file="../inc/testimonials.asp" --> <!--#include file="../inc/special-offers.asp" --> </div> <div id="left-bottom"></div> </div> <!-- Middle Column --> <a name="skipnav" class="hidden"></a> <div id="middle"> <div class="top-left"></div><div class="top-right"></div> <div class="insideleft"><div class="insideright"><div class="inside"><div class="gap-saver"></div> <!-- UK Sites --> <h2 id="unitedkingdom"><span class="hidden">United Kingdom</span></h2> <div class="minisite"><a id="minisite-swimminglessons" href="(URL address blocked: See forum rules)"><span>Swimming Lessons</span></a></div> <div class="minisite"><a id="minisite-swimminglessons" href="(URL address blocked: See forum rules)"><span>Swalings Training</span></a></div> <div class="minisite"><a id="minisite-swimminglessons" href="(URL address blocked: See forum rules)"><span>Swalings Residential Courses</span></a></div> <div class="clear"></div> <!-- Antigua Sites --> <h2 id="antigua"><span class="hidden">Antigua</span></h2> <div class="minisite"><a id="minisite-swimminglessons" href="(URL address blocked: See forum rules)"><span>Swalings Soccer</span></a></div> <div class="minisite"><a id="minisite-swimminglessons" href="(URL address blocked: See forum rules)"><span>Swalings Parties and Events</span></a></div> <div class="minisite"><a id="minisite-swimminglessons" href="(URL address blocked: See forum rules)"><span>Swalings International School of Swimming</span></a></div> <div class="minisite"><a id="minisite-swimminglessons" href="(URL address blocked: See forum rules)"><span>Swalings Babysitting and Nanny Agency</span></a></div> <div class="minisite"><a id="minisite-swimminglessons" href="(URL address blocked: See forum rules)"><span>Swalings School of Rugby</span></a></div> <div class="minisite"><a id="minisite-swimminglessons" href="(URL address blocked: See forum rules)"><span>Swalings School of Volleyball</span></a></div> <div class="minisite"><a id="minisite-swimminglessons" href="(URL address blocked: See forum rules)"><span>Swalings Training</span></a></div> <div class="clear"></div> <div class="gap-saver"></div> </div></div></div> <div class="bottom-left"></div><div class="bottom-right"></div> </div> <!-- End Middle Column --> </div> I've placed the Country Title in an H2 tag, then beneath that, each anchor is enclosed in a DIV, and is set as a left-floated block. Then I placed a spacer DIV (clear: both) to create a new line, then repeated with H2 and links. This all works fine in Firefox, IE7 and Opera, but of course IE6 is being a pig as usual. The spacer DIV is pushed to sit alongside the bottom of the left column, and I can't figure out how to (or if I can) stop this. I can't add in links properly, so I hope this is acceptable under the rules -- The site in question is: www.swalings .com/swalings/index4.asp and here's a screenshot of IE6 behaviour: www.swalings .com/images/swalings-ie6-troubleshoot.jpg Hopefully that's enough information to go on, please let me know if there's something I missed out. Thanks a lot! Rob 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? I've been working on a CSS style for a web site, and I've got a small issue with the right hand column not staying within the bounds of the screen. When using a tool to see where the div's borders the right is about 200 px going off the right of the screen, making the screen horizontally scrolling. I am not a CSS expert. I know enough to get around, but this I don't understand. (I might have posted too much, but I figured if someone needed something more, it's already all there.) Thanks for any assistance that can be provided. HTML 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>Experience Inc. - Warren and Forest Counties Office of Aging</title> <link href="css/grey_style.css" rel="stylesheet" type="text/css"> </head> <body> <div id="header"> <span style="float:left;"> <img src="images/logo.gif" /> </span> <span style="float:right;"> <div style="text-align:center"> <div id="outerFirst"><a href="index.php"><span>Home</span></a></div> <div id="outerFirst"><a href="index.php"><span>Services</span></a></div> <div id="outerFirst"><a href="index.php"><span>Senior Centers</span></a></div> <div id="outerFirst"><a href="index.php"><span>Calendar / Menu</span></a></div> <div id="outerFirst"><a href="index.php"><span>Trips / Events</span></a></div> <div id="outerFirst"><a href="index.php"><span>About / Contact</span></a></div> </div> </span> </div> <div class="CellBackGround"> <table width="100%"> <tr> <td> </td> </tr> </table> </div> <div id="pictureContainer"> <div id="largeHomeText"> Warren and Forest Counties Area Agency on Aging </div> <div class="together"> <img src="images/home_image_bar/image1.jpg" /> <img src="images/home_image_bar/image2.jpg" /> <img src="images/home_image_bar/image1.jpg" /> </div> </div> <div class="CellBackGround"> </div> <div id="wrapper"> <div id="content"> </div> </div> <div id="navigation"> <p> </p> </div> <div id="extra"> </div> <div id="footer"> <p>This is the footer area. </p> </div> </body> </html> CSS Code: body { font-family: "Times New Roman", Times, serif; font-size: 12pt; font-style: normal; font-weight: normal; color:#FFFFFF; background-color:#666666; margin-left:0; margin-top:0; margin-right:0; } #header { width: 100%; background-color: #666666; overflow:auto; vertical-align:top; height:auto; } #menu { height: 54px; margin: 3em 0; padding:0 1em; border-bottom: 0px solid black; overflow:inherit; } #outerFirst { float: left; width: 90px; height: 130px; margin: 0 0px 0 0; background: url( '../images/greyFirst.gif' ) 0 -50px no-repeat; } #outerFirst a { cursor: pointer; display: block; margin: 0; padding:0; width:90px; height:54px; overflow:hidden; font-family: Arial; font-size:0.7em; font-weight:normal; color:#FFFFFF; text-decoration: none; background: url( '../images/greyFirst.gif' ) top left no-repeat; } #outerFirst span { height: 54px; display: block; margin:0; padding: 25px 0px 0px 0px; } #outerFirst a:hover { width:90px; height:54px; background: url( '../images/greyFirstRoll.gif' ) top left no-repeat; color: yellow; } #outerFirst a:active { background: url( '../images/greyFirstRoll.gif' ) top left no-repeat; } .CellBackGround { height:2px; background: url('../images/redPixel.gif') center center; } .CellBack2 { background: url('../images/redPixel.gif') center center; } #pictureContainer { width:100%; background-color:#666666; overflow:auto; height:95px; } #largeHomeText { color:#999999; font-size:13pt; float:left; padding-top:74px; padding-left:3px; } .together img { padding: 0; margin: 0; border: 0; display: inline; float: right; overflow:hidden; } #mainTextContaner { color:#660000; margin-left:-5px; } #footer { color:#666666; } /* This code is straight from http://www.webcredible.co.uk/user-friendly-resources/css/css-round-corners-boxes.shtml */ .bl {background: url(../images/bl.gif) 0 100% no-repeat #FFFFFF; width: 45%;} .br {background: url(../images/br.gif) 100% 100% no-repeat} .tl {background: url(../images/tl.gif) 0 0 no-repeat} .tr {background: url(../images/tr.gif) 100% 0 no-repeat; padding:10px} .clear {font-size: 1px; height: 1px} /* This code is straight from http://www.webcredible.co.uk/user-friendly-resources/css/css-round-corners-boxes.shtml */ .bl2 {background: url(../images/bl.gif) 0 100% no-repeat #FFFFFF; width: 35%;} .br2 {background: url(../images/br.gif) 100% 100% no-repeat} .tl2 {background: url(../images/tl.gif) 0 0 no-repeat} .tr2 {background: url(../images/tr.gif) 100% 0 no-repeat; padding:10px} a:link { font-size: 14pt; color:#999999; } a:hover { font-size: 14pt; color:#660000; } a:visited { font-size: 14pt; color:#999999; } #news { background: url(../images/news.jpg) 100% 0 no-repeat; width:370px; height:600; } div#wrapper{ float:right; margin-right:-30%; width:99%; } div#content{ margin-right:30%; border-left:2px solid #FFFFFF; border-left-color:#660000; padding-left:10px; padding-right:10px; height:400px; padding-top:10px; } div#navigation{ float:left; width:32.9%; padding-top:10px; } div#extra{ float:left; clear:left; width:32.9%; padding-top:10px; } p{ margin:0 10px 10px } div#footer{ clear:both; border-top:2px solid; border-top-color:#660000; border-bottom:2px solid; border-bottom-color:#660000; text-align:left; color:#FFFFFF; } div#footer p{ margin:0; padding:5px 10px; width:10%; } |