CSS - Dropdown Menu Not Working Properly In Sidebar (ie)
I'm trying to get a dropdown menu to work properly (with IE, it works fine in FF) in the sidebar, thus vertically not horizontally. This dropdown menu has worked fine before, but only when using it horizontally, across the top.
Basically, it prevents the user from clicking on the submenu options (I'm thinking it has something to do with z-index), but the parent menu options work fine. You can see the issue here with IE6 or 7: http://www.groundedgroup.com/clients/NWR/ Here's the respective CSS: Code: /* Sidebar / Menu */ #sidebar { float: left; top: 16px; left: 2px; display: block; position: relative; font-family: Arial, Helvetica, sans-serif; font-size: 13px; color:#FFFFFF; letter-spacing: 1px; text-align:right; z-index: 3; } #sidebar ul { list-style-type: none; padding: 0px 0px 0px 0px; margin: 0px 0px 0px 0px; z-index: 4; } #sidebar li { display: block; float: left; min-height: 20px; position: relative; text-align: left; padding: 5px 20px 4px 16px; margin: 0px 0px 0px 0px; } #sidebar h2 { font-size: 1.2em; padding: 0; margin: 0; } #sidebar li ul { width: 150px; height: auto; top: 100%; left: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; letter-spacing: 3px; } #sidebar li.LargeMenu ul { width: 200px; height: auto; top: 100%; left: 0px; } #sidebar li ul li { text-align: left; width: 118px; height: auto; min-height: auto; display: block; } #sidebar li.LargeMenu ul li { text-align: left; width: 198px; height: auto; min-height: auto; display: block; } #sidebar a { text-decoration: none; letter-spacing: 1px; } #sidebar li li ul { top: 0; left: 0; } #sidebar li li:hover ul { left: 150px; } /* initialy hide all sub sidemenus */ #sidebar ul ul, #sidebar ul li:hover ul ul, #sidebar ul ul li:hover ul ul, #sidebar ul ul ul li:hover ul ul, #sidebar ul ul ul ul li:hover ul ul { position: absolute; display:none; } /* display them on hover */ #sidebar li:hover ul, #sidebar ul li:hover ul, #sidebar ul ul li:hover ul, #sidebar ul ul ul li:hover ul, #sidebar ul ul ul ul li:hover ul, #sidebar ul ul ul ul ul li:hover ul { display: block; } #sidebar #PhpWebcontent { display:none; } /* define the consecutive colors */ #sidebar { color: #FFFFFF; } #sidebar ul{ -moz-opacity: 1; /* for mozilla */ opacity: 1; /* for safari */ khtml-opacity: 1/* for konquerer and older safari */ } #feeds li { background: url(images/feed.png) top left no-repeat; padding-left: 18px; } #sidebar h2 { color: #FFFFFF; } #sidebar a { color: #ffffff; letter-spacing: 1px; } #sidebar ul li:hover { background: #333333; } #sidebar ul li ul { } #sidebar ul li ul li { background: #333333; } #sidebar ul li ul li:hover { background: #666666; } #sidebar ul li ul ul li{ background: #666666; } #sidebar ul li ul ul li:hover { background: #999999; } /* End Sidebar / Menu */ Any ideas on how to make this work properly when used on the side? Thanks in advance. Similar TutorialsThis code for my horizontal drop down menu works great in Chrome & Firefox but is shifted to the right in IE. I would like it to line up properly, like it does in Firefox & Chrome. Anyone have any ideas on how to make it IE compatible? Thanks! Here is the test webpage to see it live: artevaggio.com/test/slideshow_sample.html Here is the CSS source: artevaggio.com/test/artevaggio_style.css There also a snippet of CSS when you view the page source code. Thanks! Hi all, This is the xHTML link This is the CSS file. Please open this in Internet Explorer. Notice that when the drop-down menu falls over the drop-down list form, it gets hidden beneath the list. I've spent a whole week trying to fix this but wasn't successful This works perfectly in Firefox though. Thanks!! Hi, While testing our webpage, we found that in all browsers the CSS menu works fine except in Safari, on browsing the child nodes of the menu. The menu just closes on the second or third select. I would greatly appreciate any help to fix this bug. The CSS code is below. Regards, Sharon. Code : <style type="text/css" media="screen"> /**************** menu coding *****************/ #menu { width: 100%; background: #eee; float: left; } #menu ul { list-style: none; margin: 0; padding: 0; width: 12em; float: left; } #menu a, #menu h2 { font: bold 11px/16px arial, helvetica, sans-serif; display: block; border-width: 1px; border-style: solid; border-color: #ccc #888 #555 #bbb; margin: 0; padding: 2px 3px; } #menu h2 { color: #fff; background: #000; text-transform: uppercase; } #menu a { color: #000; background: #efefef; text-decoration: none; } #menu a:hover { color: #a00; background: #fff; } #menu li {position: relative;} #menu ul ul { position: absolute; z-index: 500; } #menu ul ul ul { position: absolute; top: 0; left: 100%; } div#menu ul ul, div#menu ul li:hover ul ul, div#menu ul ul li:hover ul ul {display: none;} div#menu ul li:hover ul, div#menu ul ul li:hover ul, div#menu ul ul ul li:hover ul {display: block;} </style> <!--[if IE]> <style type="text/css" media="screen"> #menu ul li {float: left; width: 100%;} </style> <![endif]--> <!--[if lt IE 7]> <style type="text/css" media="screen"> body { behavior: url(csshover.htc); font-size: 100%; } #menu ul li a {height: 1%;} #menu a, #menu h2 { font: bold 0.7em/1.4em arial, helvetica, sans-serif; } </style> <![endif]--> Built a dropdown menu (which I use on all my websites fine) and for some reason it's not working at all in IE (Using 8.0.7600), I've literally no idea why. Here's the CSS for the navigation: Code: #subnav { display: block; margin: 25px 0 0 0; padding:0 0 0 0; width: 196px; } #subnav ul { width: 196px; margin: 0; padding: 0; list-style: none; font: 11px "Verdana", "Arial", "Helvetica", "sans-serif"; } #subnav ul ul { margin: 0; padding: 0; list-style: none; } #subnav ul li { float: left; width: 196px; display: block; height: auto; margin: 0; padding: 0; font-weight: bold; } #subnav ul li a { color: #017490; display: block; width: 100%; height: auto; padding: 10px 0 10px 23px; text-decoration: none; text-shadow: 0px 1px 1px #fff; } #subnav ul li li { padding: 0; margin: 0px 0 0 0; } #subnav ul li li a { padding: 10px 0 10px 5px; line-height: normal; text-shadow: 0px 1px 1px #000; } #subnav ul a.first-level { background: #047691 url(../images/arrow.gif) top right no-repeat; } #subnav ul a.sub-level { background: #047691 url(../images/arrow.gif) 200px 6px no-repeat; } #subnav ul li a:hover, #subnav ul li a:active, #subnav ul li:hover a, #subnav ul li.sfhover a { /*color: #c7bb98;*/ text-decoration: none; background: url(../images/nav-bg-over.jpg) 0 2px no-repeat; } #subnav ul ul li:hover, #subnav ul ul li.sfhover { color: #FFF; } #subnav ul li li:hover a, #subnav ul li li.sfhover a, #subnav ul li li:hover li:hover a, #subnav ul li li.sfhover li.sfhover a, #subnav ul li li:hover li:hover li:hover a, #subnav ul li li.sfhover li.sfhover li.sfhover a { color: #FFF } /* This line cancels the highlight effect for all sub-level buttons */ body.nav-1 #subnav ul li#subnav ul-1 li a, body.nav-1 #subnav ul li#subnav ul-1 li li a, #subnav ul li li a, #subnav ul li li li a { background-image: none } body.nav-1 #subnav ul li#subnav ul-1 a, body.nav-2 #subnav ul li#subnav ul-2 a { color: #048451; } #subnav ul li ul { /* second-level lists */ position : absolute; left: -999em; z-index: 9999; margin-left : 215px; margin-top : -32px; padding: 5px 5px 5px 0px; background-color:#047691; text-transform: none!important; border-top-right-radius: 5px; border-bottom-right-radius: 5px; -moz-border-radius-topright: 5px; -moz-border-radius-bottomright: 5px; -moz-box-shadow: 0px 2px 2px #033f4d; -webkit-box-shadow: 0px 2px 2px #033f4d; box-shadow: 0px 2px 2px #033f4d; } #subnav ul li ul ul { /* third-and-above-level lists */ left: -999em; } /* Normal color */ #subnav ul li li a:link, #subnav ul li li a:visited, #subnav ul li:hover li a, #subnav ul li.sfhover li a, #subnav ul ul li.sfhover li a, #subnav ul li:hover li:hover li a, #subnav ul li.sfhover li.sfhover li a, #subnav ul li:hover li:hover li:hover li a, #subnav ul li.sfhover li.sfhover li.sfhover li a { color : #FFF; background: #047691; } /* Hover color */ #subnav ul li li a:hover, #subnav ul li li a:active, #subnav ul ul li:hover a, #subnav ul ul li:hover li:hover a, #subnav ul li.sfhover li.sfhover a, #subnav ul li.sfhover li.sfhover li.sfhover a, #subnav ul li.sfhover li a:hover, #subnav ul li.sfhover li li a:hover, #subnav ul li.sfhover li.sfhover li.sfhover li.sfhover a:hover, #subnav ul li:hover li:hover a, #subnav ul li:hover li:hover li:hover a, #subnav ul li:hover li a:hover, #subnav ul li:hover li li a:hover, #subnav ul li:hover li:hover li:hover li:hover a:hover { color : #FFF; background-color: #045669} #subnav ul li:hover ul ul, #subnav ul li:hover ul ul ul, #subnav ul li.sfhover ul ul, #subnav ul li.sfhover ul ul ul { left: -999em; } #subnav ul li:hover ul, #subnav ul li li:hover ul, #subnav ul li li li:hover ul, #subnav ul li.sfhover ul, #subnav ul li li.sfhover ul, #subnav ul li li li.sfhover ul { /* lists nested under hovered list items */ left: auto; } The live site is demo2 . abcguide .com (Sorry if I'm not supposed to link that.. I'll take it down.. ?) Greetings, I sure would appreciate some help integrating a css dropdown menu into a site. If you visit www.mts-diesel.com in FF, the drop down works find, If you open it in IE9 the dropdown does not work, BUT if you open this page www.mts-diesel.com/menu.html in IE9 the dropdown works. This leads me to think that it might be some type of z-index issue perhaps but I cant put my finger on it. Thanks for any help. Tom Hi, I am trying to make a dropdown menu by using only CSS and no Javascript. Here is my HTML Code: <ul id="nav"> <li> <a href="/family-flowers.html"><span>Family Flowers</span></a> <ul> <li> <a href="/family-flowers/anniversary-flowers.html"><span>Anniversary Flowers</span></a> </li> <li> <a href="/family-flowers/birthday-flowers.html"><span>Birthday Flowers</span></a> </li> <li> <a href="/family-flowers/christmas-bouquets.html"><span>Christmas Bouquets</span></a> </li> <li> <a href="/family-flowers/new-baby.html"><span>New baby</span></a> </li> </ul></li> <li class="level item-2 nav-congratulation"> <a href="/congratulation.html"><span>Congratulation</span></a> </li> <li class="level item-3 nav-corporate"> <a href="/corporate.html"><span>Corporate</span></a> </li> <li class="level item-4 nav-get-well"> <a href="/get-well.html"><span>Get Well</span></a> </li> <li class="level item-5 nav-love"> <a href="/love.html"><span>Love Bouquets</span></a> </li> <li class="level item-6 nav-mixed"> <a href="/mixed.html"><span>Mixed</span></a> </li> <li class="level item-7 nav-monthly"> <a href="/monthly.html"><span>Monthly</span></a> </li> <li class="level item-8 nav-funeral"> <a href="/funeral.html"><span>Funeral</span></a> </li> <li class="level item-9 nav-window"> <a href="/window.html"><span>Window plants</span></a> </li> </ul> and this is my CSS Code: #nav { list-style:none; margin:0; padding:0; width:150px; } #nav li ul { position: absolute; left: 149px; top: 0; display: none; } #nav li a { display: block; text-decoration: none; color: #777; background: #fff; padding: 5px; border: 1px solid #ccc; border-bottom: 0; } /* Fix IE. Hide from IE Mac \*/ * html ul li { float: left; } * html ul li a { height: 1%; } /* End */ #nav li:hover ul { display: block; } everything is fine, only on my hovering, the sub UL is not displaying even i made it to display as BLOCK on hover. can anybody help with this please? thank you very much [edit] in fact it is working in FF but not in IE [/edit] 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 Hi, I have the following code that all it does is list boxes under each other. Now between each box I set a margin of 10px. However in Firefox the margin (correctly) is 10px, while in IE6 the margin becomes 20px!! Code: <html> <head> <style> div.box{ float: left; margin-left: 10px; margin-bottom:10px; clear:left; border: 1px solid black; width:100px; } div.row { float: left; border: 1px solid red; } </style> </head> <body> <div class="row"> <div class="box"> Hello One </div> <div class="box"> Hello Three </div> </div> <div class="row"> <div class="box"> Hello Two </div> </div> </body> </html> Can anyone tell me why this is happing? will I have to resolve to hack to solve this, or I am writing my html incorrectly? regards, sim085 Hi there, I have just made a website using css to pop-out my menus, and they dont seem to work in safari, yet work fine in ie and firefox. The website is overload.net.nz, and the two pop-out tabs are the 'newsletter' tab, and the 'tips' tab. I have used css layers, and is wondering is that is the problem? And I dont have safari to test any changes in, does anyone know of a successful safari pc version yet? Ok i have a header and it has a SWF file on it. WHat i want to do is put the links on the same SWF file to the side but to the top of it i.e. using Z-index? but i cant get it to work? CSS Code: #header { position:relative; z-index:-1; float:left; width:100%; clear:both; } #links { border:1px solid black; position:absolute; z-index:100; top:10px; right:20px; } HTML Code: <div id="header"> <object width="550" height="400"> <param name="movie" value="/resourcebank/images/Final_banner.swf"> <embed src="/resourcebank/images/Final_banner.swf" width="100% height="20%"> </embed> </object> <span id="links"> random links </span> </div> 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 am having the same problem as a few other posters regarding Spry menu bars. I was wondering if someone here could help us. The link is The problem link Thanks Hi, I'm using C++ to create a single .cgi script. I'm now trying to incorperate some more CSS. I have added this line: <style>body { font-family: times-roman; font-size: 16px; font-weight: bolder; }</style> Now sometimes it works and sometimes it doesn't. I will keep on clicking the refresh button and it is about 1 out of 10 that there are not any fonts on the page and the table sizes jump. Does anyone know why this is possibly happening? Mike I just tested my site with IE6 and it's very broken (although it's valid HTML 4.01 strict according to w3.org). Main problem I am having is the links. I have a left navigation box, and a list of links inside it, the links display is set to 'block'. When the user's cursor is on the same line as the link, I want the whole line to change BG color and be clickable. This works now with FF perfectly. In IE your mouse has to be ON the actual link for the background to change color, and there is space on the left of the link block. Here is an example (not my site): http://rmideas.com/menus/menutest/NavToBar.htm The top right menu works like I want it to in FF, but in IE your cursor has to be on 'home'. How can I get this to work properly in both FF and IE? and I have overlapping problems, some code overlaps in one browser but looks fine in another. gday i have a bunch of tables that are only to be shown based on a javascript call, but for some reason, firefox is rendering the space of the table, where as IE 7 isn't.. eg. <table style"display: none;"></table> with a whole bunch of rows in it.. the webpage still loads blank space everywhere, rather than just empty space thoughts? Hi yall, i'm a quite newbie on css and i'm having an issue with my drop menu on the site i'm trying to do , with wordpress, multi level menu...i started from the code generated by the css generator and tried to fit it to my meeds. but, i can't control the li li menu (categories), i want it to appear exactly at the end of the li categories. 2) the second issue is that i'm trying to add a margin to the main ul because it's to near from the top. can someone help me plz? here my code Code: #suckerfishnav, #suckerfishnav ul { float: left; height: 2.98em; width: 960px; list-style: none; line-height: 1; background: white; font-weight: bold; margin: 0.1em 0.1em 0.1em 0.1em; padding: 0; } #suckerfishnav a { display: block; color: #7c6240; text-decoration: none; padding-top: 0.25em; padding-right: 0.7em; padding-bottom: 0.1em; padding-left: 0.2em; } #suckerfishnav li { float: left; padding: 0; width: 13em; height: 2.8em; } #suckerfishnav ul { position: absolute; left: -999em; height: auto; margin-left: 2em; line-height: 1; z-index: 500; } #suckerfishnav li li { width: 9.6em; border: solid #eda; border-width: 1px; padding-top; 10px; } #suckerfishnav li ul a { width: 9.8em; } #suckerfishnav li ul ul { margin: -0.20em 0 0 9.8em; } #suckerfishnav li ul { position: absolute; left: -999em; height: auto; width: 9.9em; w\idth: 9.8em; font-weight: normal; border-width: 0.20em; margin: 0; z-index: 500; } #suckerfishnav li ul a { width: 9.9em; w\idth: 9.8em; } #suckerfishnav li:hover ul ul, #suckerfishnav li:hover ul ul ul, #suckerfishnav li.sfhover ul ul, #suckerfishnav li.sfhover ul ul ul { left: -999em; } #suckerfishnav li:hover ul, #suckerfishnav li li:hover ul, #suckerfishnav li li li:hover ul, #suckerfishnav li.sfhover ul, #suckerfishnav li li.sfhover ul, #suckerfishnav li li li.sfhover ul { left: auto; } #suckerfishnav li:hover, #suckerfishnav li.sfhover { background: #eda; width: 9.5em; w\idth: 9.4em; } i'm having a problem with a couple attributes for my CSS dropdowns. view the page here (both CSS and XHTML are on the same page) specifically my .hoverBase:hover .hoverLaunch {} class which reads as such: Code: .hoverBase:hover .hoverLaunch { display:block; position:absolute; top:15px; left:-3px; width:70px; border:3px solid #000000; text-align: center; z-index: 30; } the problem is that IE6 will not display the .hoverLaunch class like FireBird does, in fact, it does not display at all. Another awesome feature of IE6 is that the :hover i have applied on the .hoverbase does not work either. Any help is appreciated. Thanks in advance. I'm looking to add a drop down menu for my site but Instead of the menu dropping down i want it to go up and I found a few things about it but nothing really helped me I was wondering how can i get a css drop down to go up? sorry if this is the wrong forum to post on.. but i am clueless on this part i am going to be starting on the script soon just wanted to know how to code the script to make it go up Thank you Smackadoo |