CSS - 2 Level Horizontal Drop Down Menu
Hello:
I inherited a site which was designed by an SEO firm. They have a 2 level horizontal drop down menu which isn't working in Internet Explorer 6. The website URL is http://www.chrisspencerhomes.com. When you hover over the links Communities, Home Plans, Available Homes and Gallery; the drop down menus do not appear in IE6. The website works great in Firefox and IE7. I attached the CSS file to this post. Can someone help me fix the CSS code so it will work on IE6? Thank you for all your time and help. Similar TutorialsHi 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! 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 Hi, I have a horizontal css menu that looks great in FF but doesn't align correctly in IE. Is anyone able to help me with a fix for IE browsers? HTML is Code: <!-- Begin Navigation --> <div id="navigation"> <ul class="nav"> <li><a href="default.html">HOME</a></li> <li><a href="rangemaster/about.html">ABOUT RANGEMASTER</a> <ul> <li><a href="http://www.rangemaster.co.uk/index_535.htm" target="_blank">COMPANY HISTORY</a></li> <li><a href="http://www.rangemaster.co.uk/index_65.htm" target="_blank">PRODUCTS</a></li> <li><a href="brochure.html">REQUEST BROCHURE</a></li> <li><a href="http://www.rangemaster.co.uk/ProdLocator.aspx" target="_blank">HOW TO BUY</a></li> <li><a href="rangemaster/recipes.html">GREAT RECIPE IDEAS</a></li> </ul> </li> <li><a href="falcon/about.html">ABOUT FALCON</a> <ul> <li><a href="falcon/history.html" target="_blank">COMPANY HISTORY</a></li> <li><a href="http://www.falconappliances.com/290.htm" target="_blank">PRODUCTS</a></li> <li><a href="brochure.html">REQUEST BROCHURE</a></li> <li><a href="http://www.falconappliances.com/ProdLocator.aspx" target="_blank">HOW TO BUY</a></li> <li><a href="falcon/recipes.html">GREAT RECIPE IDEAS</a></li> </ul> </li> <li><a href="aga/about.html">ABOUT AGA</a> <ul> <li><a href="http://www.aga-web.co.uk/92_243.htm" target="_blank">COMPANY HISTORY</a></li> <li><a href="http://www.aga-web.co.uk/89.htm" target="_blank">PRODUCTS</a></li> <li><a href="brochure.html">REQUEST BROCHURE</a></li> <li><a href="http://www.aga-web.co.uk/90_253.htm" target="_blank">HOW TO BUY</a></li> <li><a href="aga/recipes.html">GREAT RECIPE IDEAS</a></li> </ul> </li> <li><a href="rayburn/about.html">ABOUT RAYBURN</a> <ul> <li><a href="http://www.rayburn-web.co.uk/50.htm" target="_blank">COMPANY HISTORY</a></li> <li><a href="http://www.rayburn-web.co.uk/44.htm" target="_blank">PRODUCTS</a></li> <li><a href="brochure.html">REQUEST BROCHURE</a></li> <li><a href="http://www.rayburn-web.co.uk/48.htm" target="_blank">HOW TO BUY</a></li> <li><a href="rayburn/recipes.html">GREAT RECIPE IDEAS</a></li> </ul> </li> <li><a href="survey.html">FIND YOUR PERFECT COOKER</a> <li><a href="gallery.html">PHOTO GALLERY</a> <li><a href="brochure.html">BROCHURE REQUEST</a> </ul> </div> <!-- End Navigation --> and CSS is Code: ul.nav, .nav ul{ margin: 0; padding: 0; list-style-type: none; display: inline; font-family: Arial, Helvetica, sans-serif; font-weight: bold; font-size: 10px; height: 25px; width: 835px; } ul.nav{ display: table; background: url(../_images/menu.gif); } ul.nav>li{ display: table-cell; position: relative; padding: 6px 6px; color: #FFFFFF; text-align:left; } ul.nav li>ul{ display: none; position: absolute; width: 150px; margin-left: -10px; margin-top: 6px; } ul.nav li:hover>ul{ display : block; } .nav ul li a { display: block; padding: 2px 10px; color: #FFFFFF; } .nav a{ text-decoration: none; color: #FFFFFF; } .nav ul li a{ background-color: #000000; filter:alpha(opacity=80); opacity: 0.8; -moz-opacity:0.8; } .nav ul li a:hover { background-color: #B3191E; } .nav ul li a:active { background-color: #B3191E; } Many thanks... I'm trying to get my horizontal navigation to work for a PTA page I'm creating. New to CSS and I think I've got a bit of the gist of it... but I'm really struggling with this. I've mostly "found" the coding I needed and then modified it to suit my needs. As a designer, though, I still want it to look the way I want it to and I'm not quite able to accomplish that. Basically, I would like a drop down menu added to the navigation I've created here - lwptsa . org/newsite/ This is the solution I found - lwptsa . org/newsite/dropdown . html But I am unable to get the dark blue to continue to the end of the container. ** ACK, not allowed to post images. You can find the image I'm referring to he lwptsa . org/newsite/images/navigation . jpg I'd like to fix the left margin spacing and it's coloring (A), making the lines between the buttons/blocks white (B) and having the blue flush with the white containers above and below (A). I'd also like to keep the top lines between the drop-down menu (C) but remove it from the main menu/navigation (B). Hopefully this makes sense. My style sheets a No drop-down menu, but working spacing and white separating lines (id - navigation): lwptsa . org/newsite/ Code: body { margin: 20px; padding: 0; font: 100%/1.3 arial; font-size: medium; color: #000; background: #ccc; } h1, h2, h3, h4, h5, h6 { margin: 0 0 1em; line-height: 1.1; } h2, h3 { color: #00693e; } h2 { font-size: 110%; } h3 { font-size: 90%; } h4 { font-size: 118.75%; } h5 { font-size: 112.5%; } p { margin: 0 0 1em; font: 80%/1.3 helvetica, arial, sans-serif; } img { border: none; } a:link { color: blue;text-decoration:none; } a:visited { color: blue;text-decoration:none; } a:hover { color: green;text-decoration:underline; } a:link.aside { color: #00693e;font-style:italic;text-decoration:none; } a:visited.aside { color: #00693e;font-style:italic;text-decoration:none; } a:hover.aside { color: #002664;font-style:italic;text-decoration:underline; } a:link.title { color: #00693e;text-decoration:none; } a:visited.title { color: #00693e;text-decoration:none; } a:hover.title { color: #002664;text-decoration:underline; } #container { margin: 0 auto; width: 1024px; background: #fff; } #container table { font: 80%/1.3 helvetica, arial, sans-serif; } #header { font-style:italic; font-size:small; color: #00693e; background: #fff; text-align: center; height: 115px; padding: 20px 20px 20px 30px; } #navigation { font-size:small; float: left; width: 1024px; background: #002664; } #navigation ul { margin: 0; padding: 0; } #navigation ul li { list-style-type: none; display: inline; } #navigation ul ul { position: absolute; background: #d1d5da; top: 0; left: 100%; /* to position them to the right of their containing block */ width: 100%; /* width is based on the containing block */ } #navigation li a { float: left; padding: 5px 10px; color: #fff; text-decoration: none; border-right: 1px solid #fff; } #navigation li a:hover { color: #a3d869; } #content-container { float: left; width: 1024px; background: #fff; } #content { height: inherit; clear: left; float: left; width: 590px; padding: 0 20px 0 0; margin: 20px 0 20px 30px; display: inline; border-right: 1px solid #00693e; } #content h2 { margin: 0; } #aside { float: right; width: 340px; padding: 20px 0; margin: 0 20px 0 20px; display: inline; } #aside h3 { font-size: 90%;margin: 20px 0 0 0; } #aside p { font-size: 80%;margin: 0; } #footer { font-size: x-small; clear: both; color: #fff; background: #002664; text-align: center; padding: 5px; height: 1%; } #translator { text-align: center; margin: auto; position: absolute; } Drop-down menu, but issue with the blue not continuing to the end and weird issues with separating lines and margins (id - menu): lwptsa . org/newsite/dropdown . html Code: body { margin: 20px; padding: 0; font: 100%/1.3 arial; font-size: medium; color: #000; background: #ccc; } h1, h2, h3, h4, h5, h6 { margin: 0 0 1em; line-height: 1.1; } h2, h3 { color: #00693e; } h2 { font-size: 110%; } h3 { font-size: 90%; } h4 { font-size: 118.75%; } h5 { font-size: 112.5%; } p { margin: 0 0 1em; font: 80%/1.3 helvetica, arial, sans-serif; } img { border: none; } a:link { color: blue;text-decoration:none; } a:visited { color: blue;text-decoration:none; } a:hover { color: green;text-decoration:underline; } a:link.aside { color: #00693e;font-style:italic;text-decoration:none; } a:visited.aside { color: #00693e;font-style:italic;text-decoration:none; } a:hover.aside { color: #002664;font-style:italic;text-decoration:underline; } a:link.title { color: #00693e;text-decoration:none; } a:visited.title { color: #00693e;text-decoration:none; } a:hover.title { color: #002664;text-decoration:underline; } #container { margin: 0 auto; width: 1024px; background: #fff; } #container table { font: 80%/1.3 helvetica, arial, sans-serif; } #header { font-style:italic; font-size:small; color: #00693e; background: #fff; text-align: center; height: 115px; padding: 20px 20px 20px 30px; } #menu ul { font-family: Arial, Verdana; font-size:small; margin: 0; padding: 0; list-style: none;} #menu ul li { display: block; position: relative; float: left;} #menu li ul { display: none; } #menu li a { display: block; text-decoration: none; color: #ffffff; border-top: 1px solid #ffffff; padding: 5px 15px 5px 15px; background: #002664; margin-left: 1px; white-space: nowrap;} #menu ul li a:hover { background: #00693e; } #menu li:hover ul { display: block; position: absolute; } #menu li:hover li { float: none; font-size: 11px; } #menu li:hover a { background: #00693e; } #menu li:hover li a:hover { color: #fff;background: #008d53; } #content-container { float: left; width: 1024px; background: #fff; } #content { height: inherit; clear: left; float: left; width: 590px; padding: 0 20px 0 0; margin: 20px 0 20px 30px; display: inline; border-right: 1px solid #00693e; } #content h2 { margin: 0; } #aside { float: right; width: 340px; padding: 20px 0; margin: 0 20px 0 20px; display: inline; } #aside h3 { font-size: 90%;margin: 20px 0 0 0; } #aside p { font-size: 80%;margin: 0; } #footer { font-size: x-small; clear: both; color: #fff; background: #002664; text-align: center; padding: 5px; height: 1%; } #translator { text-align: center; margin: auto; position: absolute; } Any and all help welcome. I'm trying to redesign the look and information of the PTA's website. a. Hi all! I'm trying to make a horizontal menu with vertical drop downs.. However, the dropdowns don't go where they're supposed to. The menu is more or less at hybrid between a horizontal menu and a drop-down menu, so it's probably all more or less messed up You can check out the site at: cleopatra.gebodesign.no The files are at: gebodesign.no/cleopatra/menu.php gebodesign.no/cleopatra/stylesheet.css Thanks for any input Please help me how to center Ultimate Horizontal Drop-Down Menu Demo on DIV ultimate.horizontal.html Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Ultimate Horizontal Drop-Down Menu Demo</title> <link href="css/dropdown/dropdown.css" media="screen" rel="stylesheet" type="text/css" /> <link href="css/dropdown/themes/default/default.ultimate.css" media="screen" rel="stylesheet" type="text/css" /> <!--[if lt IE 7]> <script type="text/javascript" src="js/jquery/jquery.js"></script> <script type="text/javascript" src="js/jquery/jquery.dropdown.js"></script> <![endif]--> </head> <body> <h1>Ultimate Horizontal Drop-Down Menu Demo</h1> <div id="catmenu"> <ul id="nav" class="dropdown dropdown-horizontal"> <li><a href="./">Home</a></li> <li><span class="dir">About Us</span> <ul> <li><a href="./">History</a></li> <li><a href="./">Our Vision</a></li> <li><span class="dir">The Team</span> <ul> <li><a href="./">Brigita</a></li> <li><a href="./">John</a></li> <li><a href="./">Michael</a></li> <li><a href="./">Peter</a></li> <li><a href="./">Sarah</a></li> </ul> </li> <li><a href="./">Clients</a></li> <li><a href="./">Testimonials</a></li> <li><a href="./">Press</a></li> <li><a href="./">FAQs</a></li> </ul> </li> <li><span class="dir">Services</span> <ul> <li><a href="./">Product Development</a></li> <li><a href="./">Delivery</a></li> <li><a href="./">Shop Online</a></li> <li><a href="./">Support</a></li> <li><a href="./">Training & Consulting</a></li> </ul> </li> <li><span class="dir">Products</span> <ul> <li><a href="./" class="dir">New</a> <ul> <li><a href="./">Corporate Use</a></li> <li><a href="./">Private Use</a></li> </ul> </li> <li><a href="./" class="dir">Used</a> <ul> <li><a href="./">Corporate Use</a></li> <li><a href="./">Private Use</a></li> </ul> </li> <li><a href="./">Featured</a></li> <li><a href="./">Top Rated</a></li> <li><a href="./">Prices</a></li> </ul> </li> <li><a href="./">Gallery</a></li> <li><a href="./">Events</a></li> <li><a href="./">Careers</a></li> <li><a href="./" class="dir">Contact Us</a> <ul> <li><a href="./">Enquiry Form</a></li> <li><a href="./">Map & Driving Directions</a></li> <li><a href="./">Your Feedback</a></li> </ul> </li> </ul> </div> </body> </html> css/dropdown/dropdown.css Code: ul.dropdown, ul.dropdown li, ul.dropdown ul { list-style: none; display: block; /*margin: 0; padding: 0;*/ } ul.dropdown { position: inherit; z-index: 597; /* float: left;*/ } ul.dropdown li { float: left; line-height: 1.3em; vertical-align: middle; zoom: 1; text-align:left; } ul.dropdown li.hover, ul.dropdown li:hover { position: relative; z-index: 599; cursor: default; } ul.dropdown ul { visibility: hidden; position: absolute; top: 100%; /* left: 0;*/ z-index: 598; width: 100%; } ul.dropdown ul li { float: none; } ul.dropdown ul ul { top: 1px; left: 99%; } ul.dropdown li:hover > ul { visibility: visible; } css/dropdown/themes/default/default.ultimate.css Code: #catmenu{ text-align:center; width:100%; background:#f6f6f6; border-style: solid; border-width: 1px 1px 1px 0; border-color: #fff #d9d9d9 #d9d9d9; height: 34px; top: 0; right: 0; margin: 0; padding: 0; } ul.dropdown { font-weight: bold; } ul.dropdown li { padding: 7px 10px; border-style: solid; border-width: 1px 1px 1px 0; border-color: #fff #d9d9d9 #d9d9d9; background-color: #f6f6f6; color: #000; } ul.dropdown li.hover, ul.dropdown li:hover { background-color: #eee; color: #000; } ul.dropdown a:link, ul.dropdown a:visited { color: #000; text-decoration: none; } ul.dropdown a:hover { color: #000; } ul.dropdown a:active { color: #ffa500; } /* -- level mark -- */ ul.dropdown ul { width: 150px; margin-top: 1px; } ul.dropdown ul li { font-weight: normal; } /*-------------------------------------------------/ * @section Support Class `dir` * @level sep ul, .class */ ul.dropdown *.dir { padding-right: 20px; background-image: url(images/nav-arrow-down.png); background-position: 100% 50%; background-repeat: no-repeat; } /* -- Components override -- */ ul.dropdown-horizontal ul *.dir { padding-right: 15px; background-image: url(images/nav-arrow-right.png); background-position: 100% 50%; background-repeat: no-repeat; } ul.dropdown-upward *.dir { background-image: url(images/nav-arrow-top.png); } ul.dropdown-vertical *.dir, ul.dropdown-upward ul *.dir { background-image: url(images/nav-arrow-right.png); } ul.dropdown-vertical-rtl *.dir { padding-right: 10px; padding-left: 15px; background-image: url(images/nav-arrow-left.png); background-position: 0 50%; } css/dropdown/themes/default/default.css Code: #catmenu{ text-align:center; width:100%; background:#f6f6f6; border-style: solid; border-width: 1px 1px 1px 0; border-color: #fff #d9d9d9 #d9d9d9; height: 34px; top: 0; right: 0; margin: 0; padding: 0; } ul.dropdown { font-weight: bold; } ul.dropdown li { padding: 7px 10px; border-style: solid; border-width: 1px 1px 1px 0; border-color: #fff #d9d9d9 #d9d9d9; background-color: #f6f6f6; color: #000; } ul.dropdown li.hover, ul.dropdown li:hover { background-color: #eee; color: #000; } ul.dropdown a:link, ul.dropdown a:visited { color: #000; text-decoration: none; } ul.dropdown a:hover { color: #000; } ul.dropdown a:active { color: #ffa500; } /* -- level mark -- */ ul.dropdown ul { width: 150px; margin-top: 1px; } ul.dropdown ul li { font-weight: normal; } /*-------------------------------------------------/ * @section Support Class `dir` * @level sep ul, .class */ ul.dropdown *.dir { padding-right: 20px; background-image: url(images/nav-arrow-down.png); background-position: 100% 50%; background-repeat: no-repeat; } /* -- Components override -- */ ul.dropdown-horizontal ul *.dir { padding-right: 15px; background-image: url(images/nav-arrow-right.png); background-position: 100% 50%; background-repeat: no-repeat; } ul.dropdown-upward *.dir { background-image: url(images/nav-arrow-top.png); } ul.dropdown-vertical *.dir, ul.dropdown-upward ul *.dir { background-image: url(images/nav-arrow-right.png); } ul.dropdown-vertical-rtl *.dir { padding-right: 10px; padding-left: 15px; background-image: url(images/nav-arrow-left.png); background-position: 0 50%; } Thank you. Hi there, I have a css drop down menu which displays items in a drop down menu, however, I want to add a second drop down to items that have sub categories, for example: Main Link --Drop Down --- Sub category This is my HTML: PHP Code: <ul id="nav"> <li style="border-right: 1px solid #ffffff;"> <a href="#">home</a> </li> <li style="border-right: 1px solid #ffffff;"> <a href="#">about us</a> <ul> <li><a href="#">Mission</a></li> <li><a href="#">Staning Committees</a></li> <li><a href="#">Directors</a></li> <li><a href="#">Past Presidents</a></li> </ul> </li> <li style="border-right: 1px solid #ffffff;"> <a href="#">membership</a> <ul> <li><a href="#">Membership Categories</a></li> <li><a href="#">Design & Print Media</a></li> <li><a href="#">Website & Visual Design</a></li> <li><a href="#">Website & Email Hosting</a></li> <li><a href="#">Distibution</a></li> </ul> </li> <li style="border-right: 1px solid #ffffff;"> <a href="#">products</a> <ul> <li><a href="#">Our Products</a></li> <li><a href="#">Product Distribution</a></li> </ul> </li> <li style="border-right: 1px solid #ffffff;"> <a href="#">properties</a> </li> <li style="border-right: 1px solid #ffffff;"> <a href="#">advertising</a> </li> <li style="border-right: 1px solid #000000;"> <a href="#">contact</a> </li> </ul> and this is my CSS: PHP Code: ul#nav{ margin: 0px; padding: 0px; text-align: left; list-style: none; width: 790px; margin: 0px auto; position: relative; } ul#nav li{ float: left; margin: 0px; padding: 0px 2px 0px 0px; line-height: 5px; position: relative; width: 109px; } ul#nav li img{ vertical-align: top; } ul#nav li.rightLink{ float: right; } ul#nav li.last{ background: none; } ul#nav li a, span.noLink { display: block; line-height: 5px; font-size: 9px; font-family: Verdana, Arial, Helvetica, sans-serif; text-transform:uppercase; font-weight:bold; text-decoration:none; text-align:center; padding: 15px 10px 15px 10px; color: #ffffff; } * html ul#nav li a, span.noLink { padding: 20px 10px 6px 8px; } ul#nav li a:hover{ color: #ffffff; } ul#nav li:hover a, ul#nav li.sfhover a{ } ul#nav li:hover li a, ul#nav li.sfhover li a{ background: none; } ul#nav li ul{ position: absolute; margin: 0px; padding: 0px; overflow: visible; left: 0px; display: none; margin-top: hover; text-align: left; background: #000000; width: 150px; } ul#nav li li{ background: #000000; padding: 0px; margin: 0px; float: none; display: block; text-align: left; width: 100%; } ul#nav li li a{ display: block; margin: 0px; padding: 3px 3px 3px 15px; background: #f0f3f8; font-weight: normal; text-transform:none; font-weight:bolder; font-size: 10px; line-height: 12px; font-family: Arial, Helvetica, sans-serif; color: #ffffff; text-decoration: none; text-align:left; margin-left: 6px; margin-right: 6px; letter-spacing: 1px; width: 130px; } ul#nav li li a:hover{ color: #ff0000; } ul#nav li:hover ul, ul#nav li.sfhover ul{ display: block; } Any ideas how I can add a drop down to appear to the right of the drop downs which have further categories? Any help would be great! Thanks! I'm using the suggestions of those on here and using the http://www.dynamicsitesolutions.com...2/#relatedLinks menu (I'm a little confused over what the differences are but that's the least of my problems) What I want is a 2nd level drop down menu, but I'm clueless on how to go about it..??? I'm trying to add an extra level to a pop-out menu but can't get the third level to hide and display. The jscript function is suckerfish the css is a little here a little there... CSS: Code: <style type="text/css"> /* ==== STYLES FOR MAIN PART OF THE MENU ==== */ #menu { font-family: Verdana, Arial, sans-serif; font-size: 100%; width: 100px; padding: 0px; margin: 0px; display:block; } #menu, #menu ul { list-style: none; margin: 0px; padding: 0px; border: none; } #menu li ul ul { margin: 0 0 0 0em; } #menu li { float:left; width:50px; position:relative; margin: 0px; padding: 0px; } #menu a { width:100px; font-size: 80%; color:#666666; text-decoration: none; border-bottom: 1px dashed #C39C4E; padding: 5px 0px 2px 4px; display: block; } #menu a:hover, #menu a:focus { color: #000000; background-color: #AAA; } /* === STYLES FOR THE MAIN MENU (LI's) === */ .mainitems{ display:block; } /* === STYLES FOR THE POP OUT MENUS === */ .popouts{ display: none; width: 6em; position: absolute; top:0px; left: 100%; background-color: #EEFFCC; } .popouts li{ position:relative; width: 100%; } .popouts li a{ display: block; width: 100%; text-indent: 3px; } .popouts li a:hover{ background-color: yellow; color: black; } #menu li:hover ul, #menu li.over ul, #menu li li:hover ul, #menu li li.over ul{ display:block; } I've tried a couple of different things as such: Code: /* === STYLES FOR THE POP OUT MENUS === */ .popouts{ display: none; width: 6em; position: absolute; top:0px; left: 100%; background-color: #EEFFCC; } .popouts li li{ position:relative; width: 100%; } .popouts li li a{ display: block; width: 100%; text-indent: 3px; } .popouts li li a:hover{ background-color: yellow; color: black; } I've tried .popouts li li ul ul{ and even tried adding a seperate class for the third level. Can some one please help me. If you need a link to the page I'm working on, here you go. It's the last link "Links" in the menu where I'm trying to add the third level. Thanks for any help you can offer. John Hello everyone, I have a drop-down menu that is currently working well. The only change I need to make is to have the right edge of the drop-down menu to align with the right edge of the parent menu. When you hover over the menu, it currently "drops" down and to the right, with the left edges aligned. I want the menu to "drop" down and to the left, so the right edges are aligned. I have tried fiddling with floats and absolute/relative positioning. I'm not sure what needs to be changed. Any help you can provide is greatly appreciated! I'm learning via "cut and paste", so please go easy on any terminology you may use. Thank you! Here is the page: http://www.littlebuddymedia.com/site05/012.html The menu currently drops like this (aligned along the left edge): http://www.justskins.com/wp-content/uploads/2008/12/drop-down-menu.gif I want the menu to do this (align along the right edge; see how "Artists" is aligned under "Music" along the right edge): http://artatm.com/wp-content/uploads/2009/11/mtvmenu.JPG Here is my code: Code: .chromestyle{ width: 100%; font-weight: bold; float: left; height: 29px; } .chromestyle:after{ /*Add margin between menu and rest of content in Firefox*/ content: "."; display: block; height: 0; clear: both; visibility: hidden; } .chromestyle ul{ border: 0px solid #BBB; width: 100%; background: url(chromebg.gif) center center repeat-x; /*THEME CHANGE HERE*/ padding: 4px 0; margin: 0; text-align: right; /*set value to "left", "center", or "right"*/ } .chromestyle ul li{ display: inline; } .chromestyle ul li a{ color: #000000; padding: 4px 7px; margin: 0; text-decoration: none; border-left: 1px solid #DADADA; } .chromestyle ul li a:hover, .chromestyle ul li a.selected{ /*script dynamically adds a class of "selected" to the current active menu item*/ background: url(chromebg-over.gif) center center repeat-x; /*THEME CHANGE HERE*/ } /* ######### Style for Drop Down Menu ######### */ .dropmenudiv{ position:absolute; top: 0; border: 1px solid #BBB; /*THEME CHANGE HERE*/ border-bottom-width: 0; font:normal 12px Verdana; line-height:18px; z-index:100; background-color: white; width: 200px; visibility: hidden; } .dropmenudiv a{ width: auto; display: block; text-indent: 3px; border-bottom: 1px solid #BBB; /*THEME CHANGE HERE*/ padding: 2px 5px; text-decoration: none; font-weight: bold; color: black; } * html .dropmenudiv a{ /*IE only hack*/ width: 100%; } .dropmenudiv a:hover{ /*THEME CHANGE HERE*/ background-color: #0000ff; color: #fff200; } Hi I thought this would be a lot easier than it has turned out! I want to add a 4th side menu level [#subnav-col]. I don't know if i'm getting the css or the html wrong but I can't get it to work - I find it difficult to know how to do the CSS+html to a 4th level. The original HTML and CSS is here - would be grateful for some help. Many thanks HTML Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="en-"><!-- InstanceBegin template="/Templates/template-content.dwt" codeOutsideHTMLIsLocked="false" --> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <!-- InstanceBeginEditable name="meta" --> <title>General information</title> <!-- InstanceEndEditable --> <link type="text/css" href="/css/style.css" media="screen" rel="stylesheet"> <!--[if IE 8]> <link rel="stylesheet" type="text/css" href="/css/ie8.css" media="screen"> <![endif]--> <!--[if lte IE 7]> <link rel="stylesheet" type="text/css" href="/css/ie7.css" media="screen"> <![endif]--> <!--[if lte IE 6]> <link rel="stylesheet" type="text/css" href="/css/ie6.css" media="screen"> <![endif]--> <link type="text/css" href="/css/print.css" media="print" rel="stylesheet"> <script type="text/javascript" src="/js/jquery.js"></script> <script type="text/javascript" src="/js/actions.js"></script> <!-- InstanceBeginEditable name="extras" --><!-- InstanceEndEditable --> </head> <body> <div id="top"></div> <div id="container"> <div id="header"> <a class="accessLinks" href="#content" accesskey="[" tabindex="1">Skip to main content</a><span class="hidden"> | </span><a class="accessLinks" href="/accessibility.html" accesskey="0">Accessibility information</a> <a href="/" title="Go to home page" accesskey="1"><span class="site-title">Change change information </span><img src="/site-tools/img/header/logo.jpg" alt="" width="461" height="120" class="logo"></a><img src="/site-tools/img/header/header.jpg" alt="" width="509" height="120" class="header-bg"><a href="http://science.com" accesskey="/" title="services"><img src="img/header/header-icon-ng.jpg" width="223" height="30" alt="" class="vt-icon"></a> </div> <!-- end header --> <div id="main-nav"> <!-- begin menu include --> <ul> <li><a href="/" tabindex="2">Home</a></li><li><a href="/top/" tabindex="3">Science</a></li><li><a href="/adaptation/" tabindex="4">Physical impacts</a></li><li><a href="/carbon/" tabindex="5">reports</a></li><li><a href="/reducing/" tabindex="6">Doing our fair share</a></li><li class="current"><a href="/trading-scheme/" tabindex="7">trading</a></li></ul><div id="site-search"> <form action="http://search./search" method="get" name="siteSearch"> <fieldset> <legend>Site search</legend> <label for="searchBox">Search</label> <input name="q" type="text" id="searchBox"> <input name="btnG" type="submit" value="Search" class="button"> <input type="hidden" name="site" value="Change"> <input type="hidden" name="client" value="Change"> <input type="hidden" name="proxystylesheet" value="Change"> <input type="hidden" name="output" value="xml_no_dtd"> </fieldset> </form> </div><!-- end site-search --> </div> <!-- end main-nav --> <div id="content-wrapper-2col"> <div id="subnav-col"><!-- InstanceBeginEditable name="navigation" --> <h2><a href="/delay/participating/">Participating in the ETS</a></h2> <ul> <li><a href="/delay/participating/apples/">Apples</a></li> <li><a href="/delay/participating/oranges/">Oranges</a></li> <li><a href="/delay/participating/bananas/">Bananas</a></li> <li><a href="/delay/participating/Cherries/">Cherries</a></li> <li><a href="/delay/participating/grapes/">Grapes</a> <ul> <li><a href="/delay/participating/industry/obligation/">Obligations</a></li> <li><a href="/delay/participating/industry/allocation/">Allocation</a> <ul> <li><a href="/delay/participating/industry/allocation/eligible-activities/">Eligible activities</a></li> <li><a href="/delay/participating/industry/allocation/before-applying/">Before applying</a></li> <li><a href="/delay/participating/industry/allocation/calculators/">Calculators</a></li> <li><a href="/delay/participating/industry/allocation/how-it-works/">How it works</a></li> <li><a href="/delay/participating/industry/allocation/faq.html">Application FAQs</a></li> </ul> </li> <li><a href="/delay/participating/industry/call-for-data/">Call for data</a></li> <li><a href="/delay/participating/industry/faq.html">FAQs</a></li> </ul> </li> <li><a href="/delay/participating/fuels/">fuels</a></li> <li><a href="/delay/participating/synthetic/">Synthetic</a></li> <li><a href="/delay/participating/waste/">Waste</a></li> </ul> <!-- InstanceEndEditable --></div> <!-- end subnav-col --> <div id="content-col"> <div id="breadcrumbs"> <p><span class="youarehere">You are he </span><!-- InstanceBeginEditable name="crumbs" --><a href="/trading/"> trading</a><a href="#"></a> ><!-- InstanceEndEditable --></p> </div> <!-- end breadcrumbs --> <a name="content"></a><!-- InstanceBeginEditable name="content" --> <h1>About allocations </h1> <p>Financial assistance to reduce the impact of the <a href="/scheme/about/basics.html"> Some sectors by providing them with <a href="/scheme/about/emission-units.html"> Units (Us)</a>. This compensates eligible businesses for increased energy and fuel costs under the ETS and will help businesses make the necessary changes to reduce their pricing.</p> <p> There are three main groups who are eligible for allocation: </p> <ul> <li>firms whose activities are intensive and who are exposed </li> <li>fishing, and</li> <li> forestry. </li> </ul> <!-- InstanceEndEditable --></div> <!-- end content-col --> </div> <!-- end content-wrapper-2col --> <div class="clear"></div> <div id="footer"> <div id="-info"><a href="http://www.../" title="Visit the website"><img src="/site-tools/img/-logo.gif" width="211" height="57" alt=" logo"></a> </div> <!-- end -info --> <div id="call-tools"> <div id="call"> </div> <!-- end call --> <div class="clear"></div> <div id="tools"> <ul> <li><a href="/sitemap.html" accesskey="2">Site map</a></li> <li><a href="/copyright.html">Copyright</a></li> <li><a href="/disclaimer.html">Disclaimer</a></li> <li><a href="/accessibility.html#accesskeys" accesskey="0">Accessibility</a></li> <li><a href="/privacy-policy.html">Privacy policy</a></li> <li><a href="/glossary.html">Glossary</a></li> <li class="last"><a href="/contact-us.html" accesskey="9">Contact us</a></li> </ul> </div> <!-- end tools --> </div> <!-- end call-tools --> </div> <!-- end footer --> <div class="clear"></div> </div> <!-- end container --> </body> <!-- InstanceEnd --></html> CSS #subnav-col Code: /* ----- subnav (left-hand) column ----- */ #subnav-col { float: left; width: 233px; border-top: 1px solid #cacec2; } #subnav-col h2 { font-weight: normal; font-size: 1.4em; color: #234d1b; margin: 0; padding: 4px 13px 4px 13px; line-height: 1.2; background-color: #eeefeb; border-bottom: 1px solid #cacec2; } #subnav-col h2 a:link, #subnav-col h2 a:visited { color: #234d1b; text-decoration: none; } #subnav-col h2 a:hover { color: #234d1b; text-decoration: underline; } #subnav-col ul { margin: 0; padding: 0; } #subnav-col ul li { margin: 0; padding: 0; list-style-type: none; font-weight: normal; font-size: 1.2em; color: #234d1b; } #subnav-col ul li ul li, #subnav-col ul li ul li ul li { font-size: 100%; font-weight: normal; } #subnav-col ul li a:link, #subnav-col ul li a:visited { margin: 0; padding: 5px 13px 4px 13px; color: #234d1b; display: block; text-decoration: none; border-bottom: 1px solid #dcdfd7; background: #fff url(../img/bullet.gif) no-repeat 0 6px; } #subnav-col ul li a:hover { margin: 0; padding: 5px 13px 4px 13px; color: #000; display: block; text-decoration: none; border-bottom: 1px solid #dcdfd7; background: #fff url(../img/bullet-current.gif) no-repeat 0 6px; } #subnav-col ul li.current a:link, #subnav-col ul li.current a:visited, #subnav-col ul li.current a:hover { margin: 0; padding: 5px 13px 4px 13px; color: #000; display: block; text-decoration: none; border-bottom: 1px solid #dcdfd7; background: #fff url(../img/bullet-current.gif) no-repeat 0 6px; } #subnav-col ul li.parent a:link, #subnav-col ul li.parent a:visited, #subnav-col ul li.parent a:hover { margin: 0; padding: 5px 13px 4px 13px; color: #000; display: block; text-decoration: none; border-bottom: 1px solid #dcdfd7; background: #fff url(../img/bullet-parent.gif) no-repeat 0 6px; } #subnav-col ul li ul li a:link, #subnav-col ul li ul li a:visited, #subnav-col ul li.parent ul li a:link, #subnav-col ul li.parent ul li a:visited { padding: 5px 13px 4px 27px; background: #fff url(../img/bullet.gif) no-repeat 13px 6px; color: #234d1b; } #subnav-col ul li ul li a:hover, #subnav-col ul li.parent ul li a:hover { padding: 5px 13px 4px 27px; background: #fff url(../img/bullet-current.gif) no-repeat 13px 6px; color: #000; } #subnav-col ul li ul li.current a:link, #subnav-col ul li ul li.current a:visited, #subnav-col ul li ul li.current a:hover, #subnav-col ul li.parent ul li.current a:link, #subnav-col ul li.parent ul li.current a:visited, #subnav-col ul li.parent ul li.current a:hover { padding: 5px 13px 4px 27px; background: #fff url(../img/bullet-current.gif) no-repeat 13px 6px; color: #000; } #subnav-col ul li ul li a:link, #subnav-col ul li ul li a:visited, #subnav-col ul li ul li a:hover { padding: 5px 13px 4px 27px; } #subnav-col ul li ul li.parent a:link, #subnav-col ul li ul li.parent a:visited, #subnav-col ul li ul li.parent a:hover, #subnav-col ul li.parent ul li.parent a:link, #subnav-col ul li.parent ul li.parent a:visited, #subnav-col ul li.parent ul li.parent a:hover { padding: 5px 13px 4px 27px; background: #fff url(../img/bullet-parent.gif) no-repeat 13px 6px; color: #000; } #subnav-col ul li ul li ul li a:link, #subnav-col ul li ul li ul li a:visited, #subnav-col ul li.parent ul li ul li a:link, #subnav-col ul li.parent ul li ul li a:visited, #subnav-col ul li ul li.parent ul li a:link, #subnav-col ul li ul li.parent ul li a:visited, #subnav-col ul li.parent ul li.parent ul li a:link, #subnav-col ul li.parent ul li.parent ul li a:visited, #subnav-col ul li ul li.current ul li a:link, #subnav-col ul li ul li.current ul li a:visited { padding: 5px 13px 4px 40px; background: #fff url(../img/bullet.gif) no-repeat 27px 6px; color: #234d1b; } #subnav-col ul li ul li ul li a:hover, #subnav-col ul li.parent ul li ul li a:hover, #subnav-col ul li ul li.parent ul li a:hover, #subnav-col ul li.parent ul li.parent ul li a:hover { padding: 5px 13px 4px 40px; background: #fff url(../img/bullet-current.gif) no-repeat 27px 6px; color: #000; } #current a:link, #subnav-col ul li ul li ul li.current a:visited, #subnav-col ul li ul li ul li.current a:hover, #subnav-col ul li.parent ul li ul li.current a:link, #subnav-col ul li.parent ul li ul li.current a:visited, #subnav-col ul li.parent ul li ul li.current a:hover, #subnav-col ul li ul li.parent ul li.current a:link, #subnav-col ul li ul li.parent ul li.current a:visited, #subnav-col ul li ul li.parent ul li.current a:hover, #subnav-col ul li.parent ul li.parent ul li.current a:link, #subnav-col ul li.parent ul li.parent ul li.current a:visited, #subnav-col ul li.parent ul li.parent ul li.current a:hover { padding: 5px 13px 4px 40px; background: #fff url(../img/bullet-current.gif) no-repeat 27px 6px; color: #000; } /* --- blocks of content in subnav column --- */ /* subnav column links */ #subnav-col .related-links-box ul a:link, #subnav-col .highlight-box p a:link, #subnav-col .highlight-box ul a:link { color: #004161; font-weight: bold; text-decoration:none; } #subnav-col .related-links-box ul a:visited, #subnav-col .highlight-box p a:visited, #subnav-col .highlight-box ul a:visited { color:#336781; font-weight: bold; text-decoration:none; } #subnav-col .related-links-box ul a:hover, #subnav-col .highlight-box p a:hover, #subnav-col .highlight-box ul a:hover { color: #004161; font-weight: bold; text-decoration:underline; } /* related links box - subnav column */ #subnav-col .related-links-box { width: 233px; background-color: #f6f7f5; margin: 20px 0 20px 0; padding: 0; border-top: 1px solid #cacec2; } #subnav-col .related-links-box h2, #subnav-col .related-links-box h3, #subnav-col .related-links-box h4, #subnav-col .related-links-box h5, #subnav-col .related-links-box h6 { font-weight: normal; font-size: 1.4em; color: #004161; margin: 0; padding: 3px 13px 4px 13px; line-height: 1.2; background-color: #eeefeb; border-bottom: 1px solid #cacec2; } #subnav-col .related-links-box h2 a:link, #subnav-col .related-links-box h2 a:visited, #subnav-col .related-links-box h3 a:link, #subnav-col .related-links-box h3 a:visited, #subnav-col .related-links-box h4 a:link, #subnav-col .related-links-box h4 a:visited, #subnav-col .related-links-box h5 a:link, #subnav-col .related-links-box h5 a:visited, #subnav-col .related-links-box h6 a:link, #subnav-col .related-links-box h6 a:visited { color: #004161; text-decoration: none; } #subnav-col .related-links-box h2 a:hover, #subnav-col .related-links-box h3 a:hover, #subnav-col .related-links-box h4 a:hover, #subnav-col .related-links-box h5 a:hover, #subnav-col .related-links-box h6 a:hover { color: #004161; text-decoration: underline; } #subnav-col .related-links-box ul { margin: 11px 0 0 0; padding: 0 13px; } #subnav-col .related-links-box ul li { font-size: 1.1em; margin: 0; padding: 0 0 12px 14px; line-height: 1.2; list-style-type: none; background: url(../img/bullet.gif) no-repeat 0 2px; font-weight: normal; } #subnav-col .related-links-box ul li a:link { padding: 0; border-bottom: none; background: none; } #subnav-col .related-links-box ul li a:visited { padding: 0; border-bottom: none; background: none; } #subnav-col .related-links-box ul li a:hover { padding: 0; border-bottom: none; background: none; } I'm having trouble writing CSS for a nav menu that drops down to four levels. I'm able to drop down to three but I'm having a tough time with the fourth level. Please help. My CSS: /* style the top level hover */ .menu a:hover, .menu ul ul a:hover { color:#3d4058; background:#ffffff; } .menu :hover > a, .menu ul ul :hover > a { color:#3d4058; background:#ffffff; } /* make the second level visible when hover on first level list OR link */ .menu ul li:hover ul, .menu ul a:hover ul { visibility:visible; } /* keep the third level hidden when you hover on first level list OR link */ .menu ul :hover ul ul { visibility:hidden; } /* make the third level visible when you hover over second level list OR link */ .menu ul :hover ul :hover ul { visibility:visible; } /* make the 4th level hidden */ .menu ul :hover ul :hover ul ul { visibility:hidden; } /* make the 4th level visible */ .menu ul ul li:hover ul ul ul, .menu ul a:hover ul ul ul { visibility:visible; } 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 Hey there again! I have been at it ALLLLLLLLLLLL day, trying to figure out this blasted css menu to work in IE6!!! It works fine in FF but dosnt seem to like IE6 and was wondering if someone could please help me figure out the problem The first dropdown block ( <ul class="nav"> ) works fine but the second block ( <ul class="sub"> ) inside the first block ( <ul class="nav"> ) doesn't show properly in IE6!! Here is a screen shot of my problem: Here is my css: PHP Code: .navbar :hover ul.nav { padding:0; margin:0; left:0; top:40px; width:136px; z-index:604; background-color:#333333; } .navbar :hover ul.nav li a { display:block; height:24px; width:136px;} .navbar :hover ul.nav li a:hover {background:#ad8d12;} .navbar :hover ul.nav :hover ul.sub{ padding:0; margin:0; left:104px; top:-4px; width:200px; z-index:606; background-color:#333333;} /* keep the 'next' level invisible by placing it off screen. */ .navbar ul.nav, .navbar :hover ul.nav ul.sub {position:absolute; left:-9999px;} Here is my HTML code: PHP Code: <ul class="navbar"> <li><a href="#">Link<!--[if IE 7]><!--></a><!--<![endif]--> <!--[if lte IE 6]><table><tr><td><![endif]--> <ul class="nav"> <li><a href="#">Link2</a></li> <li><a href="#">Link2</a></li> <li><a href="#">Link2</a></li> <li><a href="#">Link2<!--[if IE 7]><!--></a><!--<![endif]--> <!--[if lte IE 6]><table><tr><td><![endif]--> <ul class="sub"> <li><a href="#">Link3</a></li> <li><a href="#">Link3</a></li> <li><a href="#">Link3</a></li> </ul> <!--[if lte IE 6]></td></tr></table></a><![endif]--> </li> </ul> <!--[if lte IE 6]></td></tr></table></a><![endif]--> </li> </ul> Thanks a million for even reading up to here 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? I tried to do this CSS drop down menu with 2 methods, but none of them work perfect. The first method is this: PHP Code: #menu1main { /* Top drop down menu styles */ height : 31px; display : block; } #menu1main a { /* Top drop down menu hover styles */ display : block; color : #000000; text-decoration : none; border : none; background-repeat : no-repeat; } .menu1 .menu1list { /* Hide top drop down menu submenu */ display : none; } .menu1, .display { /* Top drop down menu top level styles */ float : left; width : 110px; text-align : center; vertical-align : middle; font-family : Comic Sans MS; font-size : 10pt; line-height : 31px;} /* Top drop down menu submenu hover styles */ a.menu1b1lv1, a.menu1b1lv1:hover, a.menu1b1lv1:active { background-image : url('image/menu_banner_1.jpg'); background-position : 12px 50% ; } a.menu1b2lv1, a.menu1b2lv1:hover, a.menu1b2lv1:active { background-image : url('image/menu_banner_2.jpg'); background-position : 12px 50% ; } /* Top drop down menu submenu hover styles */ a.menu1lv2, a.menu1lv2:hover, a.menu1lv2:active { display : block; text-decoration : none; border : none; color : #000000; text-indent : 16px; text-align : left; font-size : 8pt; line-height : 20px; width : 130px; } a.menu1lv2:hover, a.menu1lv2:active { background-image : url('image/menu_cube_1.gif'); background-position : 0% 100% ; background-repeat : no-repeat; } a.menu1lv2:hover, a.menu1lv2:active, a.menu1b1lv1:hover, a.menu1b1lv1:active, a.menu1b2lv1:hover, a.menu1b2lv1:active { font-weight : bold; } The HTML for this is: Code: <div id="menu1main"> <div class="menu1" onmouseover="this.className='display'" onmouseout="this.className='menu1'"> <a class="menu1b1lv1" href="">Intro</a> <div class="menu1list"> <a class="menu1lv2" href="">Part 1 Title</a> <a class="menu1lv2" href="">Part 2 Title</a> <a class="menu1lv2" href="">Part 3 Title</a> </div></div> <div class="menu1" onmouseover="this.className='display'" onmouseout="this.className='menu1'"> <a class="menu1b2lv1" href="">Chapter 1</a> <div class="menu1list"> <a class="menu1lv2" href="">Part 1 Long Title</a> <a class="menu1lv2" href="">Part 2 Long Title</a> <a class="menu1lv2" href="">Part 3 Long Title</a> </div></div> </div> The problem with this version is I can't change the width of the submenu, or else the second Chapter title will float to the right. So I tried the second method: PHP Code: ul.top { /* Top drop down menu styles */ display : block; padding : 0; margin : 0; border : none; font-family : Comic Sans MS; font-size : 10pt; text-align : center; vertical-align : middle; } #topnav li.topnav0 { /* Top drop down top level menu styles */ position : relative; float : left; background-image : url('image/menu_banner_1.jpg'); background-position : 50% 0% ; background-repeat : no-repeat; width : 110px; line-height : 31px; } #topnav li.topnav0 a { /* Top level link styles */ color : #000000; text-decoration : none; } li.topnav0 a:hover { /* Top level hover styles */ text-decoration : none; font-weight : bold; } #topnav ul.topnav1 a:hover { /* Drop down hover styles */ text-decoration : none; background-image : url('image/menu_cube_1.gif'); background-position : 0 50% ; background-repeat : no-repeat; } li.topnav0 ul.topnav1 {/* Drop down box style */ display : none; background : #FFFFFF; padding : 0; margin : 0; position : absolute; top : 100%; left : 0; } #topnav ul.topnav1 a { /* Drop Down Submenu Item Styles */ display : block; padding : 0; margin : 0; text-indent : 16px; text-align : left; font-size : 8pt; line-height : 20px; width : 250px; } #topnav li.topnav0:hover ul.topnav1, li.over ul.topnav1, li.over li.topnav1 { /* Makes Drop down work in IE */ display : block; } And the HTML is as follow: Code: <div> <ul class="top" id="topnav"> <li class="topnav0"><div><a href="#">Home</a></div> </li> <li class="topnav0"><div><a href="#">Intro</a></div> <ul class="topnav1"> <li><a href="#">Part 1 Title</a></li> <li><a href="#">Part 2 Title</a></li> <li><a href="#">Part 3 Title</a></li> </ul> </li> <li class="topnav0"><div><a href="#">Chapter 1</a></div> <ul class="topnav1"> <li><a href="#">Part 1 Long Title</a></li> <li><a href="#">Part 2 Long Title</a></li> <li><a href="#">Part 3 Long Title</a></li> </ul> </li> </ul> </div> The problem with this version is that I cannot change the background image for each Chapter on the top level. Also, I cannot make the background of the drop down submenu transparent. If I make it transparent or delete the background line, the Part 2 link will not show up. Any help of making either method to work is great appreciated! Thank you very much! Hoping that this is a no-brainer to someone here! Here is a sample of the code for my menu using suckerfish: Code: <ul class="menu sf-menu sf-horizontal sf-js-enabled"> <li class="parent item3"> <span class="separator"><span>Dealer Info</span></span> <ul style="display: none; visibility: hidden;"> <li class="item13"> <a href=""><span>About Us</span></a> </li> </ul> </li> </ul> Top-level and sub-level nav are both working great, but you will notice when you hover down to the sub-level menu items, the top-level text goes back to white, making it impossible to read... Here is the css code for my menu: Code: /*** ESSENTIAL STYLES ***/ .sf-menu, .sf-menu * { margin: 0; padding: 0; list-style: none; font-weight: bold; } .sf-menu { line-height: 1; } .sf-menu ul { position: absolute; top: -999em; width: 10em; /* left offset of submenus need to match (see below) */ } .sf-menu ul li { width: 100%; } .sf-menu li:hover { visibility: inherit; /* fixes IE7 'sticky bug' */ } .sf-menu li { float: left; position: relative; } .sf-menu a { display: block; position: relative; font-weight: bold; } .sf-menu li:hover ul, .sf-menu li.sfHover ul { left: 0; top: 24px; /* match top ul list item height */ width: 127px; z-index: 99; background: url(../images/subnav-bg.png) no-repeat left bottom; padding: 2px 0 24px; } ul.sf-menu li:hover li ul, ul.sf-menu li.sfHover li ul { top: -999em; } ul.sf-menu li li:hover ul, ul.sf-menu li li.sfHover ul { left: 10em; /* match ul width */ top: 0; } ul.sf-menu li li:hover li ul, ul.sf-menu li li.sfHover li ul { top: -999em; } ul.sf-menu li li li:hover ul, ul.sf-menu li li li.sfHover ul { left: 10em; /* match ul width */ top: 0; } /*** DEMO SKIN ***/ .sf-menu { float: left; margin: 5px 0 0 32px; } .sf-menu a { color: #FFF; text-decoration: none; display: block; } .sf-menu .separator { cursor: pointer; display: block; } .sf-menu .separator:hover { cursor: pointer; color: #000; text-decoration: none; } .sf-menu li:hover > li, .sf-menu li:hover > a { color: #000; } .sf-menu a, .sf-menu a:visited { /* visited pseudo selector so IE6 applies text colour*/ } .sf-menu a:hover { color: #000; text-decoration: none; } .sf-menu li { text-align: center; text-transform: uppercase; background: url(../images/nav-bg.png); height: 19px; line-height: 19px; width: 122px; margin: 0 1px; font-size: 11px; } .sf-menu li li { background: none; font-size: 11px; } .sf-menu li li li { } .sf-menu li:hover, .sf-menu li.sfHover { background: url(../images/nav-bg-over.png); } /* .sf-menu li:hover, .sf-menu li.sfHover, .sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active { background: url(../images/nav-bg-over.png); } */ .sf-menu li li:hover, .sf-menu li li:hover a { background: none; color: #000; } /*** arrows **/ .sf-menu a.sf-with-ul { padding-right: 2.25em; min-width: 1px; /* trigger IE7 hasLayout so spans position accurately */ } .sf-sub-indicator { position: absolute; display: block; right: .75em; top: 1.05em; /* IE6 only */ width: 10px; height: 10px; text-indent: -999em; overflow: hidden; background: url('../images/arrows-ffffff.png') no-repeat -10px -100px; /* 8-bit indexed alpha png. IE6 gets solid image only */ } a > .sf-sub-indicator { /* give all except IE6 the correct values */ top: .8em; background-position: 0 -100px; /* use translucent arrow for modern browsers*/ } /* apply hovers to modern browsers */ a:focus > .sf-sub-indicator, a:hover > .sf-sub-indicator, a:active > .sf-sub-indicator, li:hover > a > .sf-sub-indicator, li.sfHover > a > .sf-sub-indicator { background-position: -10px -100px; /* arrow hovers for modern browsers*/ } /* point right for anchors in subs */ .sf-menu ul .sf-sub-indicator { background-position: -10px 0; } .sf-menu ul a > .sf-sub-indicator { background-position: 0 0; } /* apply hovers to modern browsers */ .sf-menu ul a:focus > .sf-sub-indicator, .sf-menu ul a:hover > .sf-sub-indicator, .sf-menu ul a:active > .sf-sub-indicator, .sf-menu ul li:hover > a > .sf-sub-indicator, .sf-menu ul li.sfHover > a > .sf-sub-indicator { background-position: -10px 0; /* arrow hovers for modern browsers*/ } /*** shadows for all but IE6 ***/ .sf-shadow ul { background: url('../images/shadow.png') no-repeat bottom right; padding: 0 8px 9px 0; -moz-border-radius-bottomleft: 17px; -moz-border-radius-topright: 17px; -webkit-border-top-right-radius: 17px; -webkit-border-bottom-left-radius: 17px; } .sf-shadow ul.sf-shadow-off { background: transparent; } Can anyone tell me what the rule is to keep that top level text black when I hover below? Thanks Ok, I know virtually nothing about css, but realized that that a css menu is better for SEO. Anyway I found this vertical menu that works the way I want it. But I also need a horizontal version of it with dropdown submenus. Can someone help with this? I have been trying a bunch of things but it just looks awful and doesn't work right. It has 3 basic componets; Html, Javascript, and css. Here they are below. drop_down.js: Code: // JavaScript Document 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; 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> <title>Horizontal Drop Down Menus</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <script type="text/javascript" src="drop_down.js"></script> <style type="text/css"> @import "style2.css"; </style> </head> <body> <ul id="nav"> <li><a href="#">Home</a></li> <li><a href="#">About</a> <ul> <li><a href="#">History</a></li> <li><a href="#">Team</a></li> <li><a href="#">Offices</a></li> </ul> </li> <li><a href="#">Services</a> <ul> <li><a href="#">Web Design</a></li> <li><a href="#">Internet Marketing</a></li> <li><a href="#">Hosting</a></li> <li><a href="#">Domain Names</a></li> <li><a href="#">Broadband</a></li> </ul> </li> <li><a href="#">Contact Us</a> <ul> <li><a href="#">United Kingdom</a></li> <li><a href="#">France</a></li> <li><a href="#">USA</a></li> <li><a href="#">Australia</a></li> </ul> </li> </ul> </body> </html> Style2.CSS: Code: body { font: normal 11px verdana; } ul { margin: 0; padding: 0; list-style: none; width: 150px; /* Width of Menu Items */ border-bottom: 1px solid #ccc; } ul li { position: relative; } li ul { position: absolute; left: 149px; /* Set 1px less than menu width */ top: 0; display: none; } /* Styles for Menu Items */ ul li a { display: block; text-decoration: none; color: #777; background: #fff; /* IE6 Bug */ padding: 5px; border: 1px solid #ccc; border-bottom: 0; } /* Fix IE. Hide from IE Mac \*/ * html ul li { float: left; height: 1%; } * html ul li a { height: 1%; } /* End */ ul li a:hover { color: #E2144A; background: #f9f9f9; } /* Hover Styles */ li ul li a { padding: 2px 5px; } /* Sub Menu Styles */ li:hover ul, li.over ul { display: block; } /* The magic */ |