CSS - Multi Column Horizontal Menu With Multi Column Drop Down
hello. I am currently using a simple horizontal top menu with a vertical drop down. I would like to change the vertical drop down to be horizontal, multi column, and should accomodate more than one line, if possible. The example I'm going for is used as top navigation he
nfl - baltimore ravens home page and he ge home page Here is the code I'm using currently (would like it to be all CSS). #### ul#mainNavigation { padding-left:185px; } ul#mainNavigation li { padding:0 16px; float: left; display:inline; position: relative; list-style: none; color:White; _width:1px; } ul#mainNavigation li.Seperator { padding:0px; _width:1px; } ul#mainNavigation li.over { background-color:white; } ul#mainNavigation li.over a { color:Red; } ul#mainNavigation li a { color:White; text-transform:uppercase; text-decoration:none; font-weight:bold; display:block; } ul#mainNavigation a:hover { color: Red; } ul#mainNavigation li a { display: block; } ul#mainNavigation li p { height:19px; } ul#mainNavigation li ul { display: none; position: absolute; background-color:Black; opacity:.8; filter: alpha(opacity=80); -moz-opacity: 0.8; margin-left:-16px; } ul#mainNavigation li.over ul { display: block; z-index:999; } ul#mainNavigation li.over ul li { float: none; background:none; border:none; white-space:nowrap; padding:0px; } ul#mainNavigation li.over ul li a { color: white; padding:5px; border-bottom:solid 1px black; } ul#mainNavigation li.over ul li a:hover { background: #3d1f6e; color: white; } ~~~~~~~ HTML ~~~~~~~~~~~~~~ <ul id="mainNavigation"> <li> <p><a href="Mainlink1.html">Mainlink1</a></p> <ul> <li><a href="link2.html">LINK 2</a></li> <li><a href="link3.html">LINK 3</a></li> <li><a href="link4.html">LINK 4</a></li> <li><a href="link5.html">LINK 5</a></li> <li><a href="link6.html">LINK 6</a></li> <li><a href="link7.html">LINK 7</a></li> </ul> </li> <li> <p><a href="Mainlink2.html">Mainlink2</a></p> <ul> <li><a href="link2.html">LINK 2</a></li> <li><a href="link3.html">LINK 3</a></li> <li><a href="link4.html">LINK 4</a></li> <li><a href="link5.html">LINK 5</a></li> <li><a href="link6.html">LINK 6</a></li> <li><a href="link7.html">LINK 7</a></li> </ul> </li> </ul> #### Thank you, in advance! ~ lahddah Similar TutorialsHi I have sucessfully created a 4 column 2 row layout which works fine in IE, FireFox & Opera. The problem i have is that search1 needs to span the width of search and vote as opposed to just the width of search. (I have included the html allowing you to see what i mean). Any ideas on how i would achieve this? - its driving me insane <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <style> div.container{position:absolute;left:0px;top:283px; width:751px; background-color:#CC3300; } div.panelmain { float:left; width: 191px; background-color:#999999; } div.panelmain1 {float:left; width: 191px; background-color:#0000FF; } div.panelmain2 {float:right;width: 170px; background-color:#CCFFFF; } #featured{ width:170px; border-top-width: 0px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-color:a6b7db; float:left ; border-right: 1px solid #cccccc; border-bottom: 1px solid #cccccc; } #vote{ width:191.3px; border-top-width: 0px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-color:a6b7db; float:left; border-right: 1px solid #cccccc; border-bottom: 1px solid #cccccc; } #vote1{ width:191.3px; border-top-width: 0px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-color:a6b7db; clear:both; border-right: 1px solid #cccccc; border-bottom: 1px solid #cccccc; } #members{ width:191.3px; border-top-width: 0px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-color:a6b7db; float:left; border-right: 1px solid #cccccc; border-bottom: 1px solid #cccccc; } #members1{ width:191.3px; border-top-width: 0px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-color:a6b7db; clear:both; border-right: 1px solid #cccccc; border-bottom: 1px solid #cccccc; } #search{ width:191.3px; border-top-width: 0px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-color:a6b7db; float:left; border-right: 1px solid #cccccc; border-bottom: 1px solid #cccccc; } #search1{ width:191.3px; border-top-width: 0px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-color:a6b7db; clear:both; border-right: 1px solid #cccccc; border-bottom: 1px solid #cccccc; } #content{ float: left; width: 55%; } </style> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <div class="container"> <div class="panelmain"> <div id="members"> members</div> <div id="members1"> <p>members1sssssssssssssssssss</p> <p>s</p> <p>ss</p> </div> </div> <div class="panelmain1"> <div id="search"> <p>Search</p> <p>d</p> <p>d</p> <p>dd</p> </div> <div id="search1"> search1 <p>s</p> <p>s</p> <p>d</p> <p>d</p> <p>ds</p> <p>s</p> <p>s</p> </div> </div> <div class="panelmain"> <div id="vote"> <p>Vote</p> <p>ss</p> <p>s</p> <p>ss</p> </div> </div> <div class="panelmain2"> <div id="featured"> <p>featured</p> <p>ss</p> <p>sss</p> <p>ss</p> <p>sss</p> <p>ss</p> <p>ss</p> <p>s</p> <p>s</p> <p>s</p> <p>s</p> <p>s</p> <p>s</p> </div> </div> </body> </html> Greetings, Basic Layout is: Page-Containter -> Header-Container -> Side-Container -> Content-Container -> Footer-Container Header is normal Side is a Float Left with a width of 250 Content has a left margin of 260 (to allow for the Side-Container) Footer is normal. Pretty basic. In the content area there are more divisions to handle different sections of data. The problem is that in some of the content sections, I need to have dynamically allocated "blocks" of data that form psuedo "columns". I do this by doing a float:left on each of the content blocks. (generally a 250px width) That way if I show 1 or 5, they all snug up next to each other and wrap properly in the browser. Still pretty basic. Until ... drum roll please ... the next section. Since the content is "float:left", it's removed from the layout and the following sections will just "snug up" next to the last content block. I want the section to "clear" the previous content division, but don't really have a clean way to declare the "height" of that division, due to the dynamic nature of the data. Silly Rabbit ... just do a clear:left !! In IE it works fine. In Firefox, the clear:left command is clearing the previous container! (side-container ... aka: left nav bar) First question: Which browser is right? is IE right and the clear:left should be contained to it's own division? or is firefox right and the clear:left checks all float:left regardless of division? Second question: If IE is right, what is the fix ... if Firefox is right, how should I actually structure this? 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 Hi, I have a multi-column layout where I want every column to always be the same height. Any one of the columns may be the longest on any given page, so the other columns have to automatically adjust to match that height. Usually I'd just use the faux column technique where you repeat a background image, but that won't work because of two elements on this page: 1. each column has a border all the way around it. 2. one column resizes with the page. I've read the articles on liquid layouts with faux columns, but as far as I can tell those techniques won't work if your columns have borders. Does anyone know any technique that would work here? Thanks. 1. top and bottom images are collapsing, i cant get them to display correctly without filling the html with either breaks or text 2. I cant get the images submenuedivider and submenuemarker to display simultaneously when i hover the links in the list. 3. Right now my soltuion to not display the divider image below the last element in the list is through the code: <li><a style="background-image: none;" href="x.html">SOmething</a></li> </ul> However, this also causes the mrker to not be seen above the list element as well, which isn't exactly what I wanted to happen, so what do I do? I'm stuck The CSS: Code: .leftCol { width: 190px; margin-top: 10px; margin-bottom: 10px; padding-top: 0px; padding-left: 0px; padding-right: 0px; padding-bottom: 10px; float: left; } .leftCol body {font-size:100%; color: #FFF;} .leftCol h1 {font-size:1.1em; font-weight:bold; color: #FFF;} .leftCol h2 {font-size:1.0em; color: #FFF;} .leftCol h3 {font-size:1.0em; color: #FFF;} .leftCol p {font-size:0.875em color: #FFF;} .submenue { width: 188px; margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-left: 0px; padding-right: 0px; padding-bottom: 0px; float: left; background-image: url(images/submenue/submenuefiller.jpg); background-repeat: repeat-y; text-indent:25px; } .submenue ul {list-style-type: none; margin: auto;} .submenue ul a {padding-bottom: 10px; background: url(images/Submenue/submenuedivider.png); background-repeat: no-repeat; background-position: bottom; display: block; line-height: 25px; text-decoration: none; font-family: "Lucida Grande", "Lucida Sans", Arial, sans-serif; color: #FFF;} .submenue ul a:hover {background-image: url(images/Submenue/submenuemarker.jpg);} .submenuetop { width: 188px; hight: 54px; padding-top: 0px; padding-bottom: 0px; background-image: url(images/Submenue/top.jpg); background-size: 100%; background-repeat: no-repeat; margin: 0; float: left; } .submenuebottom { width: 188px; hight: 60px; background-image: url(images/Submenue/bottom.jpg); background-position: left top; background-repeat: no-repeat; margin-top: 54; float: left; } The HTML: Code: <div class="leftCol"> <div class="submenuetop"></br><h1>something</h1></div> <div class="submenue"> <ul> <h3>Listing</h3> <li><a href="1.html">1</a></li> <li><a href="2.html">2</a></li> <li><a style="background-image: none;" href="3.html">5</a></li> </br> <h3>Produkt</h3> <li><a href="1.html">1</a></li> <li><a href="2.html">2</a></li> <li><a style="background-image: none;" href="3">something</a></li> </ul> </div> <div class="submenuebottom"></br></br></br></br></div> </div> I am trying to create a Horizontal Multilevel Drop Down Navigation Menu, but instead of the css creating text i would like them to be images and when you hover over the links they rollover into a new image. I would really like your help on this been trying to do it for weeks now!! Cheers ok, ive had a look on the internet (google) and in this forum, and have been upable to come up with a decent example of a mutli tier drop down menu where the sub menu also has a menu Currently I am using this code, http://www.alistapart.com/articles/dropdowns/ PHP Code: echo " <ul id=\"nav\"> <li><a href=\"#\" class=\"bodytext\">Clients</a> <ul> <li><a href=\"http://www.commusoft.co.uk/eheating/forms/addclientcard.php\" class=\"bodytext\">New Customer</a></li> <li><a href=\"http://www.commusoft.co.uk/eheating/forms/addagents.php\" class=\"bodytext\">New Agent</a></li> <li><a href=\"http://www.commusoft.co.uk/eheating/postcodecheck.php\" class=\"bodytext\">Postcode Check</a></li> </ul> </li> </ul>"; this is the javascrip to make it work with IE Code: <script language="JavaScript"> startList = function() { if (document.all&&document.getElementById) { navRoot = document.getElementById("nav"); for (i=0; i<navRoot.childNodes.length; i++) { node = navRoot.childNodes[i]; if (node.nodeName=="LI") { node.onmouseover=function() { this.className+=" over"; } node.onmouseout=function() { this.className=this.className.replace (" over", ""); } } } } } window.onload=startList; </script> Code: ul { margin: 0; padding: 0; list-style: none; width: 150px; height: 18px; border-bottom: 1px solid #ccc; } ul li { position: relative; line-height: 16px; } li ul { position: absolute; left: 149px; top: 0; display: none; float: left; } ul li a { display: block; text-decoration: none; color: #777; background: #fff; padding: 5px; border-right: 1px solid #ccc; border-bottom: 0; height: 1%; } li hover ul, li.over ul { display: block; } This is a single tier drop down menu were there are titles and a sub - menu. I was hopeing someone would point me in the direction, or show me where to begin if I want to turn this code into a multi tier drop down menu. Also, if anyone else has used this why does a gap appear between each menu option when hovering over? Any help would not only help me but will supply a decent example for others.. Thanks I have one issue left in this context menu: www.webfletch.com/sharing (( Make Sure You Right Click On The Page )) The issue is in Internet Explorer, when you click on the sub-menu or one of the links in the sub-menu. Everything works fine at that point, but when you right-click to bring up the context menu again, the sub-menu comes up showing. Because technically, the css didn't grab the mouseout (Or whatever the opposite of "hover" is.) I attempted to fix this with javascript by placing different variations of different scripts all over the code that made the sub-menu style.display = 'none' However, the javascript made the code permenant. Once it was executed, the sub-menu never showed back up again. I guess javascript out-trumps the "hover" attribute of CSS. Any thoughts? 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 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? 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 In IE6, the right sidebar column drops down below the content or disappears and creates space below the content before the footer. On some of my other pages it happens and on others, it does not. Can anyone suggest the problem and/or solution? Best, Colin http://029c92a.netsolhost.com/abrasives/cuttingdiscs.html Hi, hopefully you enjoyed the title, I had a good laugh thinking of it in that split second it took me to write it. So, I found a 3 column css layout on a CSS generator website, because I got sick of trying to hack up layouts I've made in the past that didn't work. Anyhow, it was working fine with one line of content in each column when I tested it out, however, once content in the middle column was added, and stretched vertically beyond a certain point, it will drag the left columns content down with it. The right column is not affected in any way. I have spent a few hours trying to look for reasons as to why it would happen, but I had no luck. I would appreciate any help... so thank you in advance if you take a stab at it. Here's the html: Code: <body> <div id="pagewidth"> <div id="header"></div> <div id="wrapper" class="clearfix" > <div id="twocols" class="clearfix"> <div id="maincol">Main Text, woot. (aka hi hi hi)</div> <div id="rightcol">Sidebar, yippee.</div> </div> <div id="leftcol"> <div id="navigation">test</div> </div> </div> <div id="footer"></div> </div> </body> and the CSS: Code: html, body { background: #333399; margin:0; padding:0; text-align:center; font-family: Verdana, Arial, Tahoma; font-size: 12px; font-weight: normal; color: black; } #pagewidth { width: 750px; text-align:left; margin-left:auto; margin-right:auto; background: #333399 url('images/bodycontent.gif') repeat-y center top; } #header { position:relative; height:138px; background: url('images/header.gif') center; width: 100%; } #leftcol { width: 118px; float: left; left: 25px; position: relative; background-color: transparent; margin:0; padding:0; } #twocols { width: 700px; float: right; position: relative; } #rightcol { width:180px; right: 25px; float:right; position:relative; background-color: transparent; } #maincol { background-color: transparent; float: left; left: 100px; display: inline; position: relative; width: 390px; } #footer { text-align: center; height:39px; background: url('images/footer.gif'); clear:both; } .clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } .clearfix{display: inline-table;} /* Hides from IE-mac \*/ * html .clearfix{height: 1%;} .clearfix{display: block;} /* End hide from IE-mac */ /*printer styles*/ @media print{ /*hide the left column when printing*/ #leftcol{display:none;} /*hide the right column when printing*/ #rightcol{display:none;} #twocols, #maincol{width:100%; float:none;} } Again, thank you in advance if you can come up with anything. 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! can i make my left column, the same height as my right column? or infact, if the left is taller than the right, the right extends to it and if the right is taller than the left the left extends to it? is this possible, cheers heres my css: left column, is #leftNav and the right column is #contentMain PHP Code: #content { margin:0px auto; padding: 0; width: 760px; } #contentMain { padding: 0; margin: 0; float: right; width: 632px; } #leftNav { color: #000; float: left; margin: 0; padding: 0; width: 128px; } Hi! I want to make a two-column menu with lists, is that possible, or do I need to make two UL's? Code: item 1 | item 2 item 3 | item 4 item 5 | item 6 <ul> <li/>item 1 <li/>item 3 <li/>item 5 </ul> <ul> <li/>item 2 <li/>item 4 <li/>item 6 </ul> Is there a better way? /Chrille Hi all, I've got a horizontal menu that is working just fine in every browser but IE 6 and 7. In IE it's almost there, except that the submenus will only appear one level deep. The menu is created with nested lists. The :hover functionality is simulated via JavaScript for IE 6. The IE developer toolbar shows the 3rd level menu is correctly being changed to display: block when its parent is hovered, and the border the dev toolbar draws even puts it in the correct place, it just doesn't actually appear. You can find the page he http://www.perceptes.com/topdog/ The CSS and JS (uses jQuery) can be found he http://www.perceptes.com/topdog/css/screen.css http://www.perceptes.com/topdog/css/ie.css (loaded with a conditional comment) http://www.perceptes.com/topdog/js/tdps.js http://www.perceptes.com/topdog/js/ie.js (loaded with a conditonal comment) For a specific example of what I'm talking about, try hovering over the second item, Filters & Parts. This will give you another level with four choices. Each of those also has child elements, but when hovered over, the next level doesn't appear. Try it in something other than IE 6 or 7 to see how it's supposed to look. Thanks very much in advance! 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 |