CSS - Add Another Submenu To A Css Dynamic Menu
Hi ,
I followed this tutorials (http://matthewjamestaylor.com/blog/centered-dropdown-menus) and was successfully able to create a dynamic menu . At the moment the menu displays just one drop down and not multi submenus drop-downs. Can anybody tell me what can i add to implement something like ? Tab1 Tab2 Link 1 > Link1.1 Link1.2 Link2 . My css code is :- body{behavior:;} body{behavior:url(cssHoverFix.htc);} /* Main menu settings */ #centeredmenu { clear:both; float:left; margin:0; padding:0; border-bottom:1px solid #000; /* black line below menu */ width:100%; font-family:Verdana, Geneva, sans-serif; /* Menu font */ font-size:90%; /* Menu text size */ z-index:1000; /* This makes the dropdown menus appear above the page content below */ position:relative; } /* Top menu items */ #centeredmenu ul { margin:0; padding:0; list-style:none; float:right; position:relative; right:50%; } #centeredmenu ul li { margin:0 0 0 1px; padding:0; float:left; position:relative; left:50%; top:1px; } #centeredmenu ul li a { display:block; margin:0; padding:.6em .5em .4em; font-size:1em; line-height:1em; background:#ddd; text-decoration:none; color:#444; font-weight:bold; border-bottom:1px solid #000; } #centeredmenu ul li.active a { color:#fff; background:#000; } #centeredmenu ul li a:hover { background:#36f; /* Top menu items background colour */ color:#fff; border-bottom:1px solid #03f; } #centeredmenu ul li:hover a, #centeredmenu ul li.hover a { /* This line is required for IE 6 and below */ background:#36f; /* Top menu items background colour */ color:#fff; border-bottom:1px solid #03f; } /* Submenu items */ #centeredmenu ul ul { display:none; /* Sub menus are hidden by default */ position:absolute; top:2em; left:0; float:left; right:auto; /*resets the right:50% on the parent ul */ width:10em; /* width of the drop-down menus */ } #centeredmenu ul ul li { left:auto; /*resets the left:50% on the parent li */ margin:0; /* Reset the 1px margin from the top menu */ clear:left; float:left; width:100%; } #centeredmenu ul ul li a, #centeredmenu ul li.active li a, #centeredmenu ul li:hover ul li a, #centeredmenu ul li.hover ul li a { /* This line is required for IE 6 and below */ font-size:.8em; font-weight:normal; /* resets the bold set for the top level menu items */ background:#eee; color:#444; line-height:1.4em; /* overwrite line-height value from top menu */ border-bottom:1px solid #ddd; /* sub menu item horizontal lines */ float:left; width:100%; } #centeredmenu ul ul li a:hover, #centeredmenu ul li.active ul li a:hover, #centeredmenu ul li:hover ul li a:hover, #centeredmenu ul li.hover ul li a:hover { /* This line is required for IE 6 and below */ background:#36f; /* Sub menu items background colour */ color:#fff; float:left; } /* Flip the last submenu so it stays within the page */ #centeredmenu ul ul.last { left:auto; /* reset left:0; value */ right:0; /* Set right value instead */ } #centeredmenu ul ul.last li { float:right; position:relative; right:.8em; } /* Make the sub menus appear on hover */ #centeredmenu ul li:hover ul, #centeredmenu ul li.hover ul { /* This line is required for IE 6 and below */ display:block; /* Show the sub menus */ } Html Code is :-- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <HTML> <html> <LINK REL=StyleSheet HREF="nat.css" TYPE="text/css" MEDIA=screen> <body> <div id="centeredmenu"> <ul> <li><a href="#">Tab one</a> <ul> <li><a href="#">Link one</a></li> <li><a href="#">Link two</a></li> <li><a href="#">Link three</a></li> <li><a href="#">Link four</a></li> <li><a href="#">Link five</a></li> </ul> </li> <li class="active"><a href="#" class="active">Tab two</a> <ul> <li><a href="#">Link one</a></li> <li><a href="#">Link two</a></li> <li><a href="#">Link three</a></li> <li><a href="#">Link four</a></li> <li><a href="#">Link five is a long link that wraps</a></li> </ul> </li> <li><a href="#">Long tab three</a> <ul> <li><a href="#">Link one</a></li> <li><a href="#">Link two</a></li> <li><a href="#">Link three</a></li> <li><a href="#">Link four</a></li> <li><a href="#">Link five</a></li> </ul> </li> <li><a href="#">Tab four</a> <ul class="last"> <li><a href="#">Link one</a></li> <li><a href="#">Link two</a></li> <li><a href="#">Link three</a></li> <li><a href="#">Link four</a></li> <li><a href="#">Link five</a></li> </ul> </li> </ul> </div> </body> </html> Regards, Umair Similar TutorialsHi there... I have a friend that wants me to help them out with the menu on their site. here is the link of the template they bought. uniquedealz dot com/2020 (I hope it's okay I did it like that?) Under "Product" I need to add 4 items then under one of those items/links I am adding 20 more items/links. I found out in the source code I need to use the ul code to create the actual names of the links but I am getting confused with the css class part. Any help would be great. Should I include the style.css and layout.css? Thank you Julie Hello, I am working on a website and this website got a dropdown menu and this menu works fine! But when I want to make a submenu in the dropdown, it will not work correctly. The submenu is not placed in a new row, it is placed in the main dropdown menu. The next picture shows the problem: "Test" has to be a submenu from "Wie zijn we?", but it is placed just under it. URL I have used the next HTML-Code: Code: <!-- Navigation item --> <ul> <li><a href="#">Almelo Sociaal<!--[if IE 7]><!--></a><!--<![endif]--> <!--[if lte IE 6]><table><tr><td><![endif]--> <ul> <li><a href="aswiezijnwe.html"target="iframe">Wie zijn we?</a> <ul><li><a href="aswiezijnwe.html"target="iframe">test?</a></li></ul></li> <li><a href="aswatdoenwe.html"target="iframe">Wat doen we?</a></li> <li><a href="asbestuur.html"target="iframe">Organisatie</a></li> <li><a href="asnieuws.html"target="iframe">Nieuws</a></li> <li><a href="asactiviteiten.html"target="iframe">Activiteiten</a></li> <li><a href="asafspraken.html"target="iframe">Afsprakenlijst</a></li> </ul> And I have used the next CSS-Code: Code: /*Drop-down menu*/ .nav2 {white-space:nowrap /*IE hack*/; float:left; width:954px; background:rgb(228,22,34); color:rgb(100,100,100); font-size:130%;} /*Color navigation bar normal mode*/ .nav2 ul {list-style-type:none;} .nav2 ul li {float:left; z-index:auto !important /*Non-IE6*/; z-index:1000 /*IE6*/; border-right:solid 1px rgb(175,175,175);} .nav2 ul li a {float:none; !important /*Non-IE6*/; float:left /*IE-6*/; display:block; height:2.1em; line-height:2.1em; padding:0 16px 0 16px; text-decoration:none; font-weight:normal; color: rgb(235,235,235);} .nav2 ul li ul {display:none; border:none;} /*Non-IE6 hovering*/ .nav2 ul li:hover {position:relative;} /*Sylvain IE hack*/ .nav2 ul li:hover a {background-color:rgb(228,22,34); text-decoration:none;} /*Color main cells hovering mode*/ .nav2 ul li:hover ul {display:block; width:10.0em; position:absolute; z-index:999; top:2.0em; margin-top:0.1em; left:0;} .nav2 ul li:hover ul li a {white-space:normal; display:block; width:10.0em; height:auto; line-height:1.3em; margin-left:-1px; padding:4px 16px 4px 16px; border-left:solid 1px rgb(175,175,175); border-bottom: solid 1px rgb(175,175,175); background-color:rgb(240,240,240); font-weight:normal; color:rgb(100,100,100);} /*Color subcells normal mode*/ .nav2 ul li:hover ul li a:hover {background-color:rgb(175,175,175); text-decoration:none;} /*Color subcells hovering mode*/ /*IE6 hovering*/ .nav2 table {position:absolute; top:0; left:-1px; border-collapse:collapse;} .nav2 ul li a:hover {position:relative /*Sylvain IE hack*/; z-index:1000 /*Sylvain IE hack*/; background-color:rgb(20,25,231); text-decoration:none;} /*Color main cells hovering mode*/ .nav2 ul li a:hover ul {display:block; width:10.0em; position:absolute; z-index:999; top:2.1em; t\op:2.0em; left:0; marg\in-top:0.1em;} .nav2 ul li a:hover ul li a {white-space:normal; display:block; w\idth:10.0em; height:1px; line-height:1.3em; padding:4px 16px 4px 16px; border-left:solid 1px rgb(175,175,175); border-bottom: solid 1px rgb(175,175,175); background-color:rgb(240,240,240); font-weight:normal; color:rgb(50,50,50);} /*Color subcells normal mode*/ .nav2 ul li a:hover ul li a:hover {background-color:rgb(215,215,215); text-decoration:none;} /*Color subcells hovering mode*/ Can someone help me to fix the submenu in the dropdown menu? I think myself it is a problem in the CSS. Maybe something has to be added there, but I don't know what Hello, I have what I hope is an easy question. I am trying to make a horizontal navigation menu based on code I have found on the net. I got 99% of it working EXCEPT: When sub menu text is displayed it "pushes" the main menu text to the right. my example is located he www(dot)katieandconrad(dot)com I have validated both my HTML and CSS, the errors that are displayed have nothing to do with this issue. However, I will be fixing the HTML error tonight. There's nothing I can do with the CSS errors. Thank you very much for your help. Regards, CB Hi All, I've got one of those wonderful CSS/javascript flyout menu's running on my website which is causing me a little bit of grief in Firefox and Safari. Firefox and Safari seem to be placing the 2nd and 3rd level items of the menu underneath all the other content on the page and therefore can't be seen. Seems to work well on Opera and IE. Here are the screen shots of what is happening in each browser: http://dev.platforminteractive.com.au/cssissue/css_ff.jpg - firefox http://dev.platforminteractive.com.au/cssissue/css_opera.jpg - opera http://dev.platforminteractive.com.au/cssissue/css_ie.jpg - ie You can take a look at the site and the coding behind it at http://dev.platforminteractive.com.au - just in development atm but this nav is causing me some grief. Well I honestly have no idea which forum to stick this in so I'll start here? As the title says I'm trying to make a simple css tab menu, except I'm making it very difficult lol. The problem that I'm having is not only must the tabs be able to expand and contract depending on the content/word inserted, and also if a new category is created it must create another tab. There will always be one tab present labeled home/index/etc., centered in the design. Like this As a new category/page is created/included via php a new tab shows and they stay centerd. Like this This goes on to make a total of six tabs. As of right now I was planning on using these mac style tabs for the tab images but that seems to be whats making this the most diffucult.Especially since I wanted to use a diffrent tab image for the tabs when they are selected. This would be pretty straightforward in a table layout but I'm really trying for a completely css page. I would greatly appreciate any advice if this even sounds possible the way I described, some other way possibly, or if I'm just shooting for a pipedream. Thanks very much in advance. I have a simplistic tab menu. The tabs should stretch to fit the text in it. The blank area after the last tab should fit to the end of the table as well. It was working before, but a change in text-length caused issues so apparently it was not truly dynamic. Here's the coding. If you have a solution using XHTML that is fine but it must work within other tables that are not XHTML-COMPLIANT, else it will screw up. HTML Code: <table class='tab_thin_table'> <tr> <td class='tab_start_on' rowspan='2'></td> <td class='tab_bg_on' rowspan='2'><span class='header_text'><a href='|LINK|'>LINK ONE</a></span></td> <td class='tab_end_on' rowspan='2'></td> <td class='tab_start_off' rowspan='2'></td> <td class='tab_bg_off' rowspan='2'><span class='header_text'><a href='|LINK|'>LINK TWO</a></span></td> <td class='tab_end_off' rowspan='2'></td> <td class='tab_start_off' rowspan='2'></td> <td class='tab_bg_off' rowspan='2'><span class='header_text'><a href='|LINK|>LINK THREE</a></span></td> <td class='tab_end_off' rowspan='2'></td> <td class='tab_start_off' rowspan='2'></td> <td class='tab_bg_off' rowspan='2'><span class='header_text'><a href='|LINK|'>LINK FOUR</a></span></td> <td class='tab_end_off' rowspan='2'></td> <td class='tab_thin_spacer'></td> </tr> <tr> <td class='tab_thin_top'></td> </tr> </table> CSS Code: .tab_thin_table { width: 578px; vertical-align: top; } .tab_thin_top { height: 1px; // DYNAMIC background-color: #6E7073; } .tab_thin_spacer { height: 19px; // DYNAMIC } .tab_start_on { width: 6px; height: 20px; background: url(../../image/site/tab_start_on.gif); background-repeat: no-repeat; } .tab_bg_on { background: url(../../image/site/tab_bg_on.gif); // DYNAMIC height: 20px; } .tab_end_on { width: 10px; height: 20px; background: url(../../image/site/tab_end_on.gif); background-repeat: no-repeat; } .tab_start_off { width: 6px; height: 20px; background: url(../../image/site/tab_start_off.gif); background-repeat: no-repeat; } .tab_bg_off { background: url(../../image/site/tab_bg_off.gif); // DYNAMIC height: 20px; } .tab_end_off { width: 10px; height: 20px; background: url(../../image/site/tab_end_off.gif); background-repeat: no-repeat; } Hey all, I downloaded this DHTML script for a Dynamic-Fx Slide-In Menu from http://www.dynamicdrive.com and i'm facing some trouble. The menu suits my needs perfectly with only 1 problem. I want to position the menu in a fixed location on my website somewhere other than the edge of the screen, so i adjust the xy coordinates in the ssmItems.js file to do so...the problem is that the menu changes location depending on whether the window is maximized or not and on the resolution of the monitor. I want it to stay in 1 place ALWAYS! How? PLEASE HELP! there are two .js files associated with this scrip, ssmItems.js & ssm.js and a bit of html in the <head> section of the file into which the menu is placed. Please find all 3 below: HTML code in <head> section: <STYLE> <!-- A.ssmItems:link {color:black;text-decoration:none;} A.ssmItems:hover {color:black;text-decoration:none;} A.ssmItems:active {color:black;text-decoration:none;} A.ssmItems:visited {color:black;text-decoration:none;} //--> </STYLE> <SCRIPT SRC="ssm.js" language="JavaScript1.2"> </SCRIPT> <SCRIPT SRC="ssmItems.js" language="JavaScript1.2"></SCRIPT> <script type="text/javascript"> Code from ssmItems.js file <!-- /* Configure menu styles below NOTE: To edit the link colors, go to the STYLE tags and edit the ssm2Items colors */ YOffset=188; // no quotes!! XOffset=0; staticYOffset=30; // no quotes!! slideSpeed=20 // no quotes!! waitTime=100; // no quotes!! this sets the time the menu stays out for after the mouse goes off it. menuBGColor="feb300"; menuIsStatic="yes"; //this sets whether menu should stay static on the screen menuWidth=210; // Must be a multiple of 10! no quotes!! menuCols=2; hdrFontFamily="Arial"; hdrFontSize="2"; hdrFontColor="#feb300"; hdrBGColor="#000066"; hdrAlign="left"; hdrVAlign="center"; hdrHeight="15"; linkFontFamily="arial"; linkFontSize="2"; linkBGColor="white"; linkOverBGColor="#feb300"; linkTarget="_top"; linkAlign="Left"; barBGColor="#feb300"; barFontFamily="Arial"; barFontSize="2"; barFontColor="#000066"; barVAlign="center"; barWidth=20; // no quotes!! barText="RESOURCES MENU"; // <IMG> tag supported. Put exact html for an image to show. /////////////////////////// // ssmItems[...]=[name, link, target, colspan, endrow?] - leave 'link' and 'target' blank to make a header ssmItems[0]=["Apologetics Resources"] //create header ssmItems[1]=["Christ the Teacher Series", "http://www.lumenverum.org",""] ssmItems[2]=["Lord of History Series", "http://www.lumenverum.org",""] ssmItems[3]=["Other Booklets", "http://www.lumenverum.org", ""] ssmItems[4]=["Catholic Q&A Message Board", "http://www.lumenverum.org", ""] ssmItems[5]=["Ask us a question directly", "http://www.lumenverum.org", ""] ssmItems[6]=["LVA Catalogue"] //create header ssmItems[7]=["Books", "http://www.lumenverum.org", ""] ssmItems[8]=["Tapes / CD's", "http://www.lumenverum.org", ""] ssmItems[9]=["Other", "http://www.lumenverum.org", ""] ssmItems[10]=["Lumen Verum's..."] ssmItems[11]=["Consitution", "http://www.lumenverum.org", ""] ssmItems[12]=["Patron Saint", "http://www.lumenverum.org", ""] buildMenu(); //--> Code from ssm.js file NS6 = (document.getElementById&&!document.all) IE = (document.all) NS = (navigator.appName=="Netscape" && navigator.appVersion.charAt(0)=="4") tempBar='';barBuilt=0;ssmItems=new Array(); moving=setTimeout('null',1) function moveOut() { if ((NS6||NS)&&parseInt(ssm.left)<0 || IE && ssm.pixelLeft<0) { clearTimeout(moving);moving = setTimeout('moveOut()', slideSpeed);slideMenu(10)} else {clearTimeout(moving);moving=setTimeout('null',1)}}; function moveBack() {clearTimeout(moving);moving = setTimeout('moveBack1()', waitTime)} function moveBack1() { if ((NS6||NS) && parseInt(ssm.left)>(-menuWidth) || IE && ssm.pixelLeft>(-menuWidth)) { clearTimeout(moving);moving = setTimeout('moveBack1()', slideSpeed);slideMenu(-10)} else {clearTimeout(moving);moving=setTimeout('null',1)}} function slideMenu(num){ if (IE) {ssm.pixelLeft += num;} if (NS||NS6) {ssm.left = parseInt(ssm.left)+num;} if (NS) {bssm.clip.right+=num;bssm2.clip.right+=num;}} function makeStatic() { if (NS||NS6) {winY = window.pageYOffset;} if (IE) {winY = document.body.scrollTop;} if (NS6||IE||NS) { if (winY!=lastY&&winY>YOffset-staticYOffset) { smooth = .2 * (winY - lastY - YOffset + staticYOffset);} else if (YOffset-staticYOffset+lastY>YOffset-staticYOffset) { smooth = .2 * (winY - lastY - (YOffset-(YOffset-winY)));} else {smooth=0} if(smooth > 0) smooth = Math.ceil(smooth); else smooth = Math.floor(smooth); if (IE) bssm.pixelTop+=smooth; if (NS6||NS) bssm.top=parseInt(bssm.top)+smooth lastY = lastY+smooth; setTimeout('makeStatic()', 1)}} function buildBar() { if(barText.indexOf('<IMG')>-1) {tempBar=barText} else{for (b=0;b<barText.length;b++) {tempBar+=barText.charAt(b)+"<BR>"}} document.write('<td align="center" rowspan="100" width="'+barWidth+'" bgcolor="'+barBGColor+'" valign="'+barVAlign+'"><p align="center"><font face="'+barFontFamily+'" Size="'+barFontSize+'" COLOR="'+barFontColor+'"><B>'+tempBar+'</B></font></p></TD>')} function initSlide() { if (NS6){ssm=document.getElementById("thessm").style;bssm=document.getElementById("basessm").style; bssm.clip="rect(0 "+document.getElementById("thessm").offsetWidth+" "+document.getElementById("thessm").offsetHeight+" 0)";ssm.visibility="visible";} else if (IE) {ssm=document.all("thessm").style;bssm=document.all("basessm").style bssm.clip="rect(0 "+thessm.offsetWidth+" "+thessm.offsetHeight+" 0)";bssm.visibility = "visible";} else if (NS) {bssm=document.layers["basessm1"]; bssm2=bssm.document.layers["basessm2"];ssm=bssm2.document.layers["thessm"]; bssm2.clip.left=0;ssm.visibility = "show";} if (menuIsStatic=="yes") makeStatic();} function buildMenu() { if (IE||NS6) {document.write('<DIV ID="basessm" style="visibility:hidden;Position : Absolute ;Left : '+XOffset+' ;Top : '+YOffset+' ;Z-Index : 20;width:'+(menuWidth+barWidth+10)+'"><DIV ID="thessm" style="Position : Absolute ;Left : '+(-menuWidth)+' ;Top : 0 ;Z-Index : 20;" onmouseover="moveOut()" onmouseout="moveBack()">')} if (NS) {document.write('<LAYER name="basessm1" top="'+YOffset+'" LEFT='+XOffset+' visibility="show"><ILAYER name="basessm2"><LAYER visibility="hide" name="thessm" bgcolor="'+menuBGColor+'" left="'+(-menuWidth)+'" onmouseover="moveOut()" onmouseout="moveBack()">')} if (NS6){document.write('<table border="0" cellpadding="0" cellspacing="0" width="'+(menuWidth+barWidth+2)+'" bgcolor="'+menuBGColor+'"><TR><TD>')} document.write('<table border="0" cellpadding="0" cellspacing="1" width="'+(menuWidth+barWidth+2)+'" bgcolor="'+menuBGColor+'">'); for(i=0;i<ssmItems.length;i++) { if(!ssmItems[i][3]){ssmItems[i][3]=menuCols;ssmItems[i][5]=menuWidth-1} else if(ssmItems[i][3]!=menuCols)ssmItems[i][5]=Math.round(menuWidth*(ssmItems[i][3]/menuCols)-1); if(ssmItems[i-1]&&ssmItems[i-1][4]!="no"){document.write('<TR>')} if(!ssmItems[i][1]){ document.write('<td bgcolor="'+hdrBGColor+'" HEIGHT="'+hdrHeight+'" ALIGN="'+hdrAlign+'" VALIGN="'+hdrVAlign+'" WIDTH="'+ssmItems[i][5]+'" COLSPAN="'+ssmItems[i][3]+'"> <font face="'+hdrFontFamily+'" Size="'+hdrFontSize+'" COLOR="'+hdrFontColor+'"><b>'+ssmItems[i][0]+'</b></font></td>')} else {if(!ssmItems[i][2])ssmItems[i][2]=linkTarget; document.write('<TD BGCOLOR="'+linkBGColor+'" onmouseover="bgColor=\''+linkOverBGColor+'\'" onmouseout="bgColor=\''+linkBGColor+'\'" WIDTH="'+ssmItems[i][5]+'" COLSPAN="'+ssmItems[i][3]+'"><ILAYER><LAYER onmouseover="bgColor=\''+linkOverBGColor+'\'" onmouseout="bgColor=\''+linkBGColor+'\'" WIDTH="100%" ALIGN="'+linkAlign+'"><DIV ALIGN="'+linkAlign+'"><FONT face="'+linkFontFamily+'" Size="'+linkFontSize+'"> <A HREF="'+ssmItems[i][1]+'" target="'+ssmItems[i][2]+'" CLASS="ssmItems">'+ssmItems[i][0]+'</DIV></LAYER></ILAYER></TD>')} if(ssmItems[i][4]!="no"&&barBuilt==0){buildBar();barBuilt=1} if(ssmItems[i][4]!="no"){document.write('</TR>')}} document.write('</table>') if (NS6){document.write('</TD></TR></TABLE>')} if (IE||NS6) {document.write('</DIV></DIV>')} if (NS) {document.write('</LAYER></ILAYER></LAYER>')} theleft=-menuWidth;lastY=0;setTimeout('initSlide();', 1)} Im trying to make a link that is based on 2 images, one for the un-hovered or normal state, and the other for the hover state. I just did 2 of these at 3dotmedia.com/redesign and now I'm trying to do the same thing at greedydogkennel.com/redesign but it WILL NOT WORK. I am totally stumped, it has to be something to do with the positioning inside my css I assume... on the page, I want the pictures of the dogs to be normal, but when hovered I have a frosty shaded grey image (as in some kind of lighting) to serve as the hover state..I am masking the a href with a class with a transparent .gif (since SOMETHING has to serve as the object of the anchor yes?) but here is my css: .rock-link {background-image: url(looks/Rock_small_w_frame.jpg); } .rock-link:hover {background-image: url(looks/Rock_small_w_frame-up.jpg); } .suade-link {background-image: url(looks/Suadey_Ladysmall_w_frame.jpg); } .suade-link:hover {background-image: url(looks/Suadey_Ladysmall_w_frame-up.jpg); } and the HTML is as follows: <a href="suade.html" class="suade-link"><img src="looks/seethru2.gif" border="0"/></a> <img src="looks/spacer2.gif" border="0" /> <a href="rock.html" class="rock"><img src="looks/seethru.gif" border="0" /></a></div> but there is nothing that displays, only the transparent .gif on the index page you will not see any images under the heading "The Dogs" because this is where the problem is, but if you click on any of the links you will see the pages where I have not applied the class for the a href to take on the hover states, just so you can see how the images look and where they appear. I have done this so many times, and my code is IDENTICAL at 3dotmedia.com/redesign and it works fine...any help would be GREATLY appreciated...it has to be something Im missing, but WHAT?!?!? thanks. Hi people. Have been trying to get this CSS Nav (for weeks) to when the user MouseOvers the 'link', a 'SubMenu' pops out with several (3) menus (links). Have got nowhere!! Any help would be greatly appreciated! Heres the main code so far.: Code: <style> .buttonscontainer {width: 135px;} .buttons a {color: #FFFFFF; background-color: #6699CC; padding: 2px; padding-left: 3px; display: block; border-left: 10px solid #000000; font: 11px Verdana, sans-serif; font-weight: bold; text-decoration: none; text-align: left; margin-top: 1px;} .buttons a:hover {border-left: 10px solid #6699CC; text-decoration: none; background-color: #000000;} </style> <div class="buttonscontainer"> <div class="buttons"> <a href="#" onMouseOver="window.status='Jedburgh Gallary'; return true" onMouseOut="window.status=' '"; return true";>Jedburgh</a> </div> </div> Thank alot people. Jackson Hi, I am working on a submenu: <ul class="subuls"> ... How do I make "CANADA" to be positioned under "USA" ? Code: <style type="text/css"> #topNav{ background-color:#CCCC99; height:33px; margin:0px; } #topNav li{ height:33px; list-style: none; float: left; position: relative; z-index: 1000; padding: 0; margin: 0; } #topNav li.topNavSep{ height:33px; background-color:#FF0000; width:1px; } #topNav li ul.subuls { /* display: none; */ width:126px; position: absolute; top: 33px; left:0px; margin: 0; padding: 0; border: 1px solid #0D458A; } #topNav li:hover ul, li.over ul { /* lists nested items */ display: block; } </style> </head><body> <div id="topNav"> <li class="topNavTitle"> <a href="" >Home</a> </li> <li class="topNavSep"></li> <li class="topNavTitle"> <a href="" >FAQ</a> <ul class="subuls"> <li><a href="">USA</a></li> <li><a href="">CANADA</a></li> </ul> </li> <li class="topNavSep"></li> <li class="topNavTitle"> <a href="" >Contact</a> </li> </div> Okay, I have a navigation and one link, "SERVICES" has a sub-menu. The submenu looks good in Firefox, Safari, and Netscape for the Mac. Also Firefox for the PC, but not IE7 for the PC. Here's the site: http://www.caillouette.com/Villere_dynamic2/rentals.php Please rollover, "SERVICES" in IE. Here's the style sheet (*note: I created it Dreamweaver using Spry. I am only including the code of interest) Code: /* Submenus should appear below their parent (top: 0) with a higher z-index, but they are initially off the left side of the screen (-1000em) */ ul.MenuBarHorizontal ul { margin: 0; padding: 0; list-style-type: none; font-size: 9pt; font-weight: bold; color: #FFFFFF; /*text color*/ padding: 0px 0 0 12px; text-decoration: none; z-index: 1020; cursor: default; width: 8.2em; position: absolute; left: -1000em; display:block; } /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to auto so it comes onto the screen below its parent menu item */ ul.MenuBarHorizontal ul.MenuBarSubmenuVisible { left: auto; } /* Menu item containers are same fixed width as parent */ ul.MenuBarHorizontal ul li { width: 100%pt; } /* Submenus should appear slightly overlapping to the right (95%) and up (-5%) */ ul.MenuBarHorizontal ul ul { position: absolute; margin: -5% 0 0 95%; } /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to 0 so it comes onto the screen */ ul.MenuBarHorizontal ul.MenuBarSubmenuVisible ul.MenuBarSubmenuVisible { left: auto; top: 0; } /******************************************************************************* DESIGN INFORMATION: describes color scheme, borders, fonts *******************************************************************************/ /* Submenu containers */ ul.MenuBarHorizontal ul { border: 0px; background-color: #AEB0B3; } /* status for the new colors */ ul.MenuBarHorizontal ul a { border: 0px; color:#FFFFFF; background-color: #AEB0B3; padding: 0 30px 0 0; } ul.MenuBarHorizontal ul a:hover { border: 0px; color:#444343; background-color: #AEB0B3; padding: 0 30px 0 0; } /* end new colors */ ul.MenuBarHorizontal a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal a.MenuBarSubmenuVisible{ text-size:9pt; font-weight:normal; /* background-color: #AEBOB3; */ color: #9dba44; } /******************************************************************************* SUBMENU INDICATION: styles if there is a submenu under a given menu item *******************************************************************************/ /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */ /*ul.MenuBarHorizontal a.MenuBarItemSubmenu { background-image: url(SpryMenuBarDown.gif); background-repeat: no-repeat; background-position: 95% 50%; } */ /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */ /*ul.MenuBarHorizontal ul a.MenuBarItemSubmenu { background-image: url(SpryMenuBarRight.gif); background-repeat: no-repeat; background-position: 95% 50%; } */ /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */ ul.MenuBarHorizontal a.MenuBarItemSubmenuHover { background-image: url(SpryMenuBarDownHover.gif); background-repeat: no-repeat; background-position: 95% 50%; } /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */ ul.MenuBarHorizontal ul a.MenuBarItemSubmenuHover { background-image: url(SpryMenuBarRightHover.gif); background-repeat: no-repeat; background-position: 95% 50%; } /******************************************************************************* BROWSER HACKS: the hacks below should not be changed unless you are an expert *******************************************************************************/ /* HACK FOR IE: to make sure the sub menus show above form controls, we underlay each submenu with an iframe */ ul.MenuBarHorizontal iframe { position: absolute; z-index: 1010; } /* HACK FOR IE: to stabilize appearance of menu items; the slash in float is to keep IE 5.0 from parsing */ @media screen, projection { ul.MenuBarHorizontal li.MenuBarItemIE { display: inline; f\loat: left; background: #FFF; } ul.MenuBarHorizontal ul aIE { border: 0px; color:#FFFFFF; background-color: #AEB0B3; padding: 0 30px 0 0; } ul.MenuBarHorizontal ul a:hoverIE { border: 0px; color:#444343; background-color: #AEB0B3; padding: 0 30px 0 0; } } thanks This is driving me nuts! I've been trying to do the simplest thing for over 3 hours now. Any help would be greatly appreciated! It's not allowing me to post a link to the site at hand. [myoviedolawyerDOTcom/index2.php]It seems to be working fine in Firefox and Safari, but IE is giving me troubles (as always). Here is the CSS (sorry if it's a mess, I'm learning) ul.MenuBarVertical { margin: 0; padding: 0; list-style-type: none; font-size: 100%; cursor: default; width: 298px; background-image: url(../images/PracticeAreas.gif); z-index: 2; } ul.MenuBarActive { z-index: 1000; } ul.MenuBarVertical li { margin: 0; padding: 0; list-style-type: none; font-size: 100%; position: relative; text-align: left; cursor: pointer; width: 298px; } ul.MenuBarVertical ul { margin: 0% 0 0 100%; padding: 0; list-style-type: none; font-size: 100%; position: absolute; z-index: 1020; cursor: default; width: 8.2em; left: -1000em; top: 0; } ul.MenuBarVertical ul.MenuBarSubmenuVisible { left: 0; } ul.MenuBarVertical ul li { width: 302px; background-color: #CCC; border: 1px solid #A32B34; z-index: 2; } ul.MenuBarVertical { border: 0px; } ul.MenuBarVertical ul { border: 0px; } ul.MenuBarVertical a { display: block; cursor: pointer; padding: 0.5em 0.75em; color: #A32B34; text-decoration: none; } ul.MenuBarVertical a:hover, ul.MenuBarVertical a:focus { color: #FFF; } ul.MenuBarVertical a.MenuBarItemHover, ul.MenuBarVertical a.MenuBarItemSubmenuHover, ul.MenuBarVertical a.MenuBarSubmenuVisible { color: #FFF; } ul.MenuBarVertical a.MenuBarItemSubmenu { background-image: url(../images/PracticeAreas.gif); background-repeat: no-repeat; background-position: left top; background-attachment: fixed; width: 298px; } ul.MenuBarVertical a.MenuBarItemSubmenuHover { background-repeat: no-repeat; background-position: left top; background-image: url(../images/Template_10_ro_10.png); background-attachment: fixed; width: 298px; } ul.MenuBarVertical iframe { position: absolute; z-index: 1010; filter:alpha(opacity:0.1); } @media screen, projection { ul.MenuBarVertical li.MenuBarItemIE { display: inline; f\loat: left; z-index: 2; } } -------------------------------------------------------------- Any help would be greatly appreciated! ~cheers~ Hello, I have tried to design a vertical menu with sub-menu's popping out to the right. I have used this onMouseOver and onMouseout events. Here is the html for the menu Code: <div id="menu"> <ul> <li><a href="#">About Swamiji</a></li> <li id="m1" onMouseOver="showsub('m1')" onMouseOut="hidesub('m1')"> Ashramams <ul> <li class="hide"><a href="#"> > ashramam@dowaleshwaram</a></li> <li class="hide"><a href="#"> > ashramam@hyderabad</a></li> <li class="hide"><a href="#"> > ashramam@vishakapatnam</a></li> </ul> </li> <li><a href="#">Temples</a></li> <li id="m2" onMouseOver="showsub('m2')" onMouseOut="hidesub('m2')"> Wings of Organization <ul> <li class="hide"><a href="#"> > Satsang Groups</a></li> <li class="hide"><a href="#"> > Mathru Mandali</a></li> <li class="hide"><a href="#"> > Youth Wing</a></li> <li class="hide"><a href="#"> > Seva Samithi</a></li> </ul> </li> <li><a href="#">Articles</a></li> <li><a href="#">Swamiji's Monthly letter</a></li> <li><a href="#">Photo Gallery</a></li> <li id="m3" onMouseOver="showsub('m3')" onMouseOut="hidesub('m3')"> Store <ul> <li class="hide"><a href="#"> > Books [in Telugu]</a></li> <li class="hide"><a href="#"> > Books [in English]</a></li> <li class="hide"><a href="#"> > Audio CD's</a></li> <li class="hide"><a href="#"> > Video CS's</a></li> </ul> </li> <li><a href="#">Swamiji's Darshan Timings</a></li> <li id="m4" onMouseOver="showsub('m4')" onMouseOut="hidesub('m4')"> Giridhari [Monthly Magazine] <ul> <li class="hide"><a href="#"> > Subscribe</a></li> <li class="hide"><a href="#"> > Read Sample Magazines</a></li> </ul> </li> <li><a href="#">Swamiji's Itinerary</a></li> <li><a href="#">Programmes</a></li> <li><a href="#">Donations</a></li> </ul> </div> Here is the css for the menu Code: div#menu{ background-color:#ffcccc; border-top:thin red solid; border-bottom:thin red solid; clear:left; display:block; width:100%; float:left; font:bold .75em helvetica; } div#menu ul{ padding:0; margin:0; list-style-type:none; } div#menu a{ margin:0; text-decoration:none; } div#menu li{ border:1px #cfc solid; background-color:#ffcccc; position:relative; } div#menu ul * li{ background-color:#ff6666; } div#menu a:hover{ background-color:#ffffcc; } Here are the javascript functions for showing and hiding the sub-menu's Code: function showsub(elm) { menumain=document.getElementById(elm); subm=menumain.getElementsByTagName("li"); for (i=0;i<subm.length;i++) { subm[i].className='show'; } } function hidesub(elm) { menumain=document.getElementById(elm); subm=menumain.getElementsByTagName("li"); for (i=0;i<subm.length;i++) { subm[i].className='hide'; } } Here is the css only for hiding .hide{ visibility:hidden; display:none; } With this css for showing .show{ visibility:visible; display:block; } , I am getting this menu1. With this css for showing .show{ visibility:visible; display:block; position:absolute; top:0; width:100%; margin:0 0 0 100%; } I am getting the menu as in menu2 image. I would like the sub-menu to pop out as in menu2 image without blank space that is appearing at the bottom of the main menu item. If I am not wrong , problem is setting the position of the sub-menu which is a css issue. What should I do to get it right? Thank you. I am attempting to put together a site with CSS navigation for the first time. Thanks to people much smarter than I, I've been able to stitch other's lessons into something almost workable. THE PROBLEM I have a horizontal menu with a submenu. This submenu should also display horizontally. It does in FF, but not in either IE6 or IE7. In these browsers, it displays vertically. I have tried a lot of things and finally gave up. I validated my code and was given a pass. I've tried narrowing down the problem and have tried searching for the answer but I just can't figure it out. If needed, you can view the problem at www.foundationfitnesscenter.com/schedule (ignore the crappy header image, it's just there to show an idea for now). The CSS where I feel the problem must be: Code: #nav #schedule-sub, #nav #education-sub, #nav #classes-sub { display:none; width:90%; } body.classes #nav ul#classes-sub a, body.schedule #nav ul#schedule-sub a, body.education #nav ul#education-sub a { background-image:none; color:#3300FF; font-size:100%; font-weight:bold; line-height:10px; margin-right:4px; padding:2px 10px 2px 10px; text-decoration:none; } body.classes #nav ul#classes-sub, body.schedule #nav ul#schedule-sub { display:block; position:absolute; left:15px; top:95px; } body.education #nav ul#education-sub { display:block; position:absolute; left:175px; top:95px; } The HTML Code: <ul id="nav"> <li class="home-list"><a href="/index.php">Home</a></li> <li class="classes-list"><a href="../classes/">Classes</a> <ul id="classes-sub"> <li><a href="../classes/pilates.php">Pilates</a></li> <li><a href="../classes/dance.php">Dance</a></li> <li><a href="../classes/gyrokinesis.php">Gyrokinesis</a></li> </ul> </li> <li class="schedule-list"><a href="../schedule/">Schedule</a> <ul id="schedule-sub"> <li><a href="../schedule/class-schedule">View All Classes</a></li> <li><a href="../schedule/enroll-private.php">Enroll - Private</a></li> <li><a href="../schedule/enroll-group.php">Enroll - Group</a></li> </ul> </li> <li class="education-list"><a href="../education/">Education</a> <ul id="education-sub"> <li><a href="../education/pilates/">Pilates</a></li> <li><a href="../education/dance/">Dance</a></li> <li><a href="../education/gyrokinesis/">Gyrokinesis</a></li> </ul> </li> <li class="about-list"><a href="../about/">About</a></li> <li class="contact-list"><a href="../contact/">Contact</a></li> </ul> Please look at this page - http://www.rodstrans.com/menu.html When you place the mouse over "Services" you will see a nice little (imho) sub menu appear. I have it working well in IE7 & IE8 but there is a small glitch I need some help with. If you carefully place your mouse in the white space between the nav bar and the submenu the submenu disappears. I tried increasing the height of the li but unless I specify a background on the li the increased height does nothing. What I am after is I would like the submenu to be positioned about 5 pixels lower than where it is now, but this issue is preventing me from doing that. In other words, I want the submenu to be seperated from the main nav bar by about 10 pixels, but if I do that then this issue will really be a problem. Thanks. Tom Hello, I am having a small issue, and after about 10 hours of trying to fix it myself I am looking for help. The problem is when you hover over the Suckerfish menu and it expands, the first entry covers the parent item... I have temporary corrected this by adding the parent as a sub item so it appears to be OK... however I do not wish to keep it this way as I cannot set the submenu width to be the same until the submenu appears below the parent as it should. The site is www.DesolationWildernessVolunteers.org <-- I used the forum code to make this a click able link but for some reason it is not working.... CSS verifys however there is 3 errors in the XHTML that is a result of the template, and though I have tried to locate the errors I cannot find the correct file that is presenting them. I do not believe this is the source of the problem though. The css file controlling the menu is menu.css Code: /** IE bugs: a:link, a:visited, a:hover need to be styled as well; does not display separator... workaround? */ /** customize colors here */ a.mainlevel-son-of-suckerfish-horizontal, a.mainlevel_active-son-of-suckerfish-horizontal, a.mainlevel_current-son-of-suckerfish-horizontal, a.mainlevel-son-of-suckerfish-horizontal:link, a.mainlevel_active-son-of-suckerfish-horizontal:link, a.mainlevel_current-son-of-suckerfish-horizontal:link, a.mainlevel-son-of-suckerfish-horizontal:visited, a.mainlevel_active-son-of-suckerfish-horizontal:visited, a.mainlevel_current-son-of-suckerfish-horizontal:visited { /** background-color: red; */ /** color: white; */ } a.mainlevel-son-of-suckerfish-horizontal:hover, a.mainlevel_active-son-of-suckerfish-horizontal:hover, a.mainlevel_current-son-of-suckerfish-horizontal:hover { /* background-color: #E0E0E0; */ /* color: red; */ } a.sublevel-son-of-suckerfish-horizontal, a.sublevel_active-son-of-suckerfish-horizontal, a.sublevel_current-son-of-suckerfish-horizontal, a.sublevel-son-of-suckerfish-horizontal:link, a.sublevel_active-son-of-suckerfish-horizontal:link, a.sublevel_current-son-of-suckerfish-horizontal:link, a.sublevel-son-of-suckerfish-horizontal:visited, a.sublevel_active-son-of-suckerfish-horizontal:visited, a.sublevel_current-son-of-suckerfish-horizontal:visited { background-color: #638D4D; color: white; width: auto; } a.sublevel-son-of-suckerfish-horizontal:hover, a.sublevel_active-son-of-suckerfish-horizontal:hover, a.sublevel_current-son-of-suckerfish-horizontal:hover { /* background-color: #E0E0E0; */ /* color: green; */ } ul.mainlevel-son-of-suckerfish-horizontal ul ul a.sublevel-son-of-suckerfish-horizontal, ul.mainlevel-son-of-suckerfish-horizontal ul ul a.sublevel_active-son-of-suckerfish-horizontal, ul.mainlevel-son-of-suckerfish-horizontal ul ul a.sublevel_current-son-of-suckerfish-horizontal, ul.mainlevel-son-of-suckerfish-horizontal ul ul a.sublevel-son-of-suckerfish-horizontal:link, ul.mainlevel-son-of-suckerfish-horizontal ul ul a.sublevel_active-son-of-suckerfish-horizontal:link, ul.mainlevel-son-of-suckerfish-horizontal ul ul a.sublevel_current-son-of-suckerfish-horizontal:link, ul.mainlevel-son-of-suckerfish-horizontal ul ul a.sublevel-son-of-suckerfish-horizontal:visited, ul.mainlevel-son-of-suckerfish-horizontal ul ul a.sublevel_active-son-of-suckerfish-horizontal:visited, ul.mainlevel-son-of-suckerfish-horizontal ul ul a.sublevel_current-son-of-suckerfish-horizontal:visited { background-color: blue; color: white; } ul.mainlevel-son-of-suckerfish-horizontal ul ul a.sublevel-son-of-suckerfish-horizontal:hover, ul.mainlevel-son-of-suckerfish-horizontal ul ul a.sublevel_active-son-of-suckerfish-horizontal:hover, ul.mainlevel-son-of-suckerfish-horizontal ul ul a.sublevel_current-son-of-suckerfish-horizontal:hover { background-color: #E0E0E0; color: blue; } ul.mainlevel-son-of-suckerfish-horizontal .expanded { display: block; background-image: url("../images/arrow_down.gif"); background-position: right center; background-repeat: no-repeat; padding-right: 10px; } ul.mainlevel-son-of-suckerfish-horizontal ul .expanded { background-image: url("../images/arrow_right.gif"); } /** customize style / layout here */ a.mainlevel-son-of-suckerfish-horizontal, a.mainlevel_active-son-of-suckerfish-horizontal, a.mainlevel_current-son-of-suckerfish-horizontal, span.mainlevel-son-of-suckerfish-horizontal, a.mainlevel-son-of-suckerfish-horizontal:link, a.mainlevel_active-son-of-suckerfish-horizontal:link, a.mainlevel_current-son-of-suckerfish-horizontal:link, a.mainlevel-son-of-suckerfish-horizontal:visited, a.mainlevel_active-son-of-suckerfish-horizontal:visited, a.mainlevel_current-son-of-suckerfish-horizontal:visited, a.mainlevel-son-of-suckerfish-horizontal:hover, a.mainlevel_active-son-of-suckerfish-horizontal:hover, a.mainlevel_current-son-of-suckerfish-horizontal:hover, a.sublevel-son-of-suckerfish-horizontal, a.sublevel_active-son-of-suckerfish-horizontal, a.sublevel_current-son-of-suckerfish-horizontal, span.sublevel-son-of-suckerfish-horizontal, a.sublevel-son-of-suckerfish-horizontal:link, a.sublevel_active-son-of-suckerfish-horizontal:link, a.sublevel_current-son-of-suckerfish-horizontal:link, a.sublevel-son-of-suckerfish-horizontal:visited, a.sublevel_active-son-of-suckerfish-horizontal:visited, a.sublevel_current-son-of-suckerfish-horizontal:visited, a.sublevel-son-of-suckerfish-horizontal:hover, a.sublevel_active-son-of-suckerfish-horizontal:hover, a.sublevel_current-son-of-suckerfish-horizontal:hover { font-weight: normal; font-size: 100%; text-align: left; text-decoration: none; display: block; border: 0px solid silver; padding: 0.3em 0.5em 0.3em 0.5em; /* top, right, bottom, left */ } a.mainlevel-son-of-suckerfish-horizontal, a.mainlevel_active-son-of-suckerfish-horizontal, a.mainlevel_current-son-of-suckerfish-horizontal, span.mainlevel-son-of-suckerfish-horizontal { } a.sublevel-son-of-suckerfish-horizontal, a.sublevel_active-son-of-suckerfish-horizontal, a.sublevel_current-son-of-suckerfish-horizontal, span.sublevel-son-of-suckerfish-horizontal { font-size: 90%; border-top: none; height: 1%; /* this is required for the IE to cause the "hasLayout" property and make the whole anchor clickable - "Holly Hack" */ } #active_menu-son-of-suckerfish-horizontal, a.mainlevel_active-son-of-suckerfish-horizontal, a.mainlevel_current-son-of-suckerfish-horizontal, a.mainlevel_active-son-of-suckerfish-horizontal:link, a.mainlevel_current-son-of-suckerfish-horizontal:link, a.mainlevel_active-son-of-suckerfish-horizontal:visited, a.mainlevel_current-son-of-suckerfish-horizontal:visited, a.mainlevel_active-son-of-suckerfish-horizontal:hover, a.mainlevel_current-son-of-suckerfish-horizontal:hover, a.sublevel_active-son-of-suckerfish-horizontal, a.sublevel_current-son-of-suckerfish-horizontal, a.sublevel_active-son-of-suckerfish-horizontal:link, a.sublevel_current-son-of-suckerfish-horizontal:link, a.sublevel_active-son-of-suckerfish-horizontal:visited, a.sublevel_current-son-of-suckerfish-horizontal:visited, a.sublevel_active-son-of-suckerfish-horizontal:hover, a.sublevel_current-son-of-suckerfish-horizontal:hover { font-weight: bold; } ul.mainlevel-son-of-suckerfish-horizontal, .mainlevel-son-of-suckerfish-horizontal ul { padding: 0; margin: 0; list-style: none; line-height: 1; z-index: 100; } ul.mainlevel-son-of-suckerfish-horizontal li { padding: 0; margin: 0; background: none; float: left; } ul.mainlevel-son-of-suckerfish-horizontal li li { position: relative; display: block; width: 10em; } ul.mainlevel-son-of-suckerfish-horizontal ul { display: block; position: absolute; left: -999em; margin: -0.2em 0 0 0em; width: auto; height: auto; z-index: 101; } ul.mainlevel-son-of-suckerfish-horizontal li li ul { margin: -1.8em 0 0 10em; z-index: 102; } /** IE7.0 workaround */ ul.mainlevel-son-of-suckerfish-horizontal li:hover, ul.mainlevel-son-of-suckerfish-horizontal li.hover { position: static; } /** general on-mouse-over display */ ul.mainlevel-son-of-suckerfish-horizontal li:hover ul, ul.mainlevel-son-of-suckerfish-horizontal li.hover ul { left: auto; } ul.mainlevel-son-of-suckerfish-horizontal li:hover ul ul, ul.mainlevel-son-of-suckerfish-horizontal li.hover ul ul { left: -999em; } ul.mainlevel-son-of-suckerfish-horizontal li:hover ul li:hover ul, ul.mainlevel-son-of-suckerfish-horizontal li.hover ul li.hover ul { left: auto; } ul.mainlevel-son-of-suckerfish-horizontal, ul.mainlevel-son-of-suckerfish-horizontal li li { clear: left; } /** separator */ span.mainlevel-son-of-suckerfish-horizontal, span.sublevel-son-of-suckerfish-horizontal { display: block; width: 1em; border-width: 0px; margin-left: 1em; padding: 0; padding-top: 1px; } /** IE5.0/win workaround: the ">" is handled like a "," */ ul.mainlevel-son-of-suckerfish-horizontal > ul.mainlevel-son-of-suckerfish-horizontal { position: absolute; top: 5em; /* change the absolute position for IE5.0 here */ } ul.mainlevel-son-of-suckerfish-horizontal > ul.mainlevel-son-of-suckerfish-horizontal li.hover ul { margin: 0.1em 0 0 0em; /* top, right, bottom, left */ } ul.mainlevel-son-of-suckerfish-horizontal > ul.mainlevel-son-of-suckerfish-horizontal li.hover ul ul { margin: -1.6em 0 0 10em; /* top, right, bottom, left */ } Now if I change: Code: /** general on-mouse-over display */ ul.mainlevel-son-of-suckerfish-horizontal li:hover ul, ul.mainlevel-son-of-suckerfish-horizontal li.hover ul { left: auto; } to include position: relative; like so: Code: /** general on-mouse-over display */ ul.mainlevel-son-of-suckerfish-horizontal li:hover ul, ul.mainlevel-son-of-suckerfish-horizontal li.hover ul { position: relative; left: auto; } then the menu functions properly except it pushed the entire page down to do so, causing more of an eye sore than if the menu conforms to the lengths of the menu items. Any help in resolving this problem is greatly appreciated. EDIT: BB code not working on the link to my website... My parent menu div is absolutely positioned. What should be the position of submenu div so that it will appear exactly below the respective parent menu. My parent menu div is #ParentMenu { z-index: 3; position: absolute; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left:0px; top: 42px; left: 45px; width: auto; text-align:Center; color:Black; } #SubMenu { color: red; z-index: 1; text-align:center; border:1px solid #333333; position:absolute; width:10%; float:left; } In this case,the sub menu appears immediate after the parent menu not below it. Please suggest what should be the position for SubMenu. Thanks. I'm trying to get my submenu lists to be the same width between IE and Firefox, but they aren't equal for some reason. I'm setting the width to 8em, but it's displaying differently between the two browsers. Here's a link to the page Here is my css: Code: /*Set all elements to start out with margin:0 and padding:0*/ * { margin:0; padding:0; } body{ font-family: arial,verdana,sans-serif; font-size: 100%; height:100%; background-color:white; color:black; behavior:url("./css/csshover.htc"); } /* Needed to clearfix to clear out floats*/ * html .clearfix{ height:1%; } /* This class is used to clear out floats properly*/ .clearfix{ display:inline; } /* same as above */ .clearfix:after{ content:"."; display:block; height:0; clear:both; visibility:hidden; } img{ text-decoration:none; border:0; } /*Tile Bar Container*/ #titleMenu{ position:absolute; height:13%; width:100%; border-bottom:1px solid #003366; z-index:1002; } #titleMenu h3{ position:relative; float:left; margin:15px 0 0 15px; font-size:1.50em; font-style:italic; font-family:arial,sans-serif; letter-spacing:1.5px; word-spacing:2px; color:#333366; } /* Main Menu of image categories*/ #titleMenu ul{ position:relative; margin-right:60px; margin-top:6px; z-index:1003; } #titleMenu li{ position:relative; list-style-type:none; float:right; padding:0 35px 0 0; margin:0; z-index:1099; } /* Sub menu*/ #titleMenu ul li ul{ position:absolute; margin:0; top:70px; left:-1px; width:8em; z-index:1000; } #titleMenu ul li ul li{ width:100%; letter-spacing:1px; padding:0; border-left:1px solid #BBBBBB; border-right:1px solid #BBBBBB; border-bottom:1px solid #BBBBBB; background-color:#EEEEEE; z-index:1001; } #titleMenu ul li ul li ul{ position:absolute; margin:0; top:-1px; left:8em; visibility:hidden;; } #titleMenu ul li ul li:hover{ background-color:#FFFFFF; } /* Sets the first element of ul li ul li ONLY*/ .titleMenuFirstItem{ border-top:1px solid #BBBBBB; } /* Style the links in the sub menu's*/ #titleMenu a{ display:block; width:100%; font-size:.55em; text-decoration:none; color:#003366; padding:1px 6px; } #titleMenu a:hover{ /*none*/ } /* Rollover functionality for dropdown menus*/ #titleMenu ul li ul{ display:none; } #titleMenu ul li:hover ul{ display:block; } /* Rollover functionality for popout menus*/ #titleMenu ul li ul li:hover ul{ visibility:visible; } /* iFrame Container holding the iFrame*/ #iFrameContainer{ position:absolute; padding:1px 0; top: 15%; height:78%; width:100%; border-top:1px solid #BBBBBB; border-bottom:1px solid #BBBBBB; } /* Container holding the footer */ #footer{ position:absolute; width:100%; height:4%; bottom:0; border-top:1px solid #003366; background-color:#EEEEEE; font-size:.65em; } #footer ul{ padding-right:5px; } #footer ul li{ list-style-type:none; padding:5px 20px 5px 0; float:right; } #footer a{ text-decoration:none; color:#003366; letter-spacing:1px; } #footer a:hover{ border-bottom:1px solid #003366; } redmeetsblue.com.au/forum-test/ I'm having a problem with our 3rd level sub-menu links in our top menu. we need to specify a height:auto on the .moduletable_topmenu li a because I need each list item to have an easy changable name. this may mean it has 2 lines for 1 name such as the 3rd item under "Test". Though when we have 2 or more 3rd level items the 2nd level moves with the 3rd level. Such as the 2nd item under "Test" Can anyone think of a way to make this 2nd level list not move with the 3rd level items? Great forum been looking around but haven't seen anything that answers my question. I have a menu in wordpress witha drop down sub menu. The menu has a colored bar over the links that changes colors when a link is hovered or on the current page. Problem is this. The sub menu I want to be clean, but it is showing the bar over the link when one of those pages is current. Here is the html for the sub menu: Code: <ul class="sub-menu"> <li id="menu-item-539" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-539"><a href="http://gellyfish.com/led/portfolio/living-rooms-family-rooms/">living rooms + family rooms</a></li> <li id="menu-item-536" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-536"><a href="http://gellyfish.com/led/portfolio/kitchens-dining-rooms/">kitchens + dining rooms</a></li> <li id="menu-item-538" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-538"><a href="http://gellyfish.com/led/portfolio/bedrooms/">bedrooms</a></li> <li id="menu-item-537" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-537"><a href="http://gellyfish.com/led/portfolio/bathrooms/">bathrooms</a></li> <li id="menu-item-535" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-535"><a href="http://gellyfish.com/led/portfolio/before-after/">before & after</a></li> <li id="menu-item-542" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-542"><a href="http://gellyfish.com/led/portfolio/commerical/">commerical</a></li> </ul> Here is the CSS that I cant get to stop placing the bar on it.... Code: #access .current_page_item > a, #access .current_page_ancestor > a { color:#963300; background-image:url("images/redbar.jpg"); background-position:top center; background-repeat:repeat-x; } Here is the code I am trying to figure out how to stop the bar... Code: #acess ul ul li.current-menu-item a{ background-image:none;} I do want the red bar on the top menu, just not on the sub menu. I messed with this a million ways and dont seem to be able to get rid of the bar on top.. Any help is greatly appreciated. |