CSS - Unable To Get The Top Border Of A Dropdown Menu To Appear
I have a dropdown menu that was generated using .net When I try to apply some .css style tags:
.menuitem { background-color:#fff; color:#ffffff; text-align:left; border-bottom: 1px solid #cccccc; border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; padding: 2px 8px 3px 10px; margin:0px;} It works BUT, if I add: border-top attribute I get a double border on all the other items in the list but the first. Is there something I can do? I had thought about trying to create a .css tag for the first item in the list with it's own attributes. Any ideas? Thanks! Stephen Similar TutorialsHi, I written some CSS it works fine except in IE6 the visit page highlight block is not covering the entire height of my menu bar, here is the code: Code: /** Style for menu starts here */ #menu { width: 800px; height: 50px; margin: 0px auto; background: #264779; } #menu ul { margin: 0px; padding: 0 0 0 10px; list-style: none; } #menu li { display: inline; } #menu a { display: block; float: left; padding: 14px 30px 10px 8px; text-decoration: none; color: #FFFFFF; } #menu a:hover { color: #D7D7BD; } body#home a#homenav, body#errorlogs a#errornav { color: #fff; background: #FFC109; /**Yellow*/ font-weight: bold; margin: 0px auto; padding: 14px 20px 10px 20px; text-decoration: none; } What is happening here is: the visit page highlight the respective menu but height of the menu block is 10px shorter than the height of the actual menu. 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 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 First I am using Dreamweaver MX2004. I am still new to CSS, have not used it much. Still using tables (yeah i know) for the layout. Mainly because when I've tried positioning in the past, IE doesn't display it right. Layers don't seem to work for me! What I'd like to know is: can I use CSS (the son of suckerfish dropdowns) for my drop down menu in a separate HTML file that would be saved as a library item? I'd like the nav separate so I can update it easily. Should I also use a separate CSS file that would only be associated with the nav? Is necessary to have an external css sheet, if it only applys to this nav? The nav would get dropped into a table row under the top banner. My issue is: will it get positioned right ? And will it view ok in IE??? Hope I explained this right. I fear that what I have already coded, would get messed up if I do this! But due to search engine optimization, I'd like to avoid a fully functioning javascript dropdown. If you have a better suggestion/usage for a dropdown horizontal nav, I'd appreciate your ideas! Thanks for the advice! Valerie Hey all, having a bit of trouble getting my drop down menu to display properly. It's modeled after the suckerfish menu, only modded a bit. Here's the site...hover over 'machines' to see what i'm talking about (have to use FF, i haven't added the JS for IE yet). The drop down is adopting the rollovers from the mainmenu, and I don't know what to change to make 'em different. Here's the CSS for the menu: Code: #mainmenu { width:780px; height:41px; margin:auto; position:relative; } #mainmenu li.navigation { width:78px; height:41px; float:left; text-align:center; background:#B8A488 url(images/mainmenu_roll.gif) no-repeat; } #mainmenu li.navigation a{ background:#66563D url(images/mainmenu_off.gif) no-repeat; display:block; text-decoration:none; color:#F4F1E5; height:31px; padding-top:10px; } #mainmenu li.navigation a:hover { background:transparent; color:#66563D; } #mainmenu li#home { background-image:url(images/home_roll.gif); } #mainmenu li#home a{ background-image:url(images/home_off.gif); } #mainmenu li#home a:hover { background:transparent; } #mainmenu li#contact { background-image:url(images/contact_roll.gif); } #mainmenu li#contact a { background-image:url(images/mainmenu_off.gif); } #mainmenu li#contact a:hover { background:transparent; } /* BEGIN DROP DOWN MENU */ li ul { display: none; position: absolute; top: 1px; margin-left:-2px; background-color:#B8A488; border-left:1px solid #66563D; border-bottom:1px solid #66563D; padding:2px; z-index:500; } * html li ul { top:26px; } /* li ul li { padding:0; } */ li > ul { top: auto; left: auto; } li:hover ul, li.over ul{ display: block; } Thanks! Hi, on my site http://www.mattmdesign.com, sometimes when you mouseover the portfolio the menu appears in the wrong spot. someone also said that it is appearing on the left side of the page everytime with mozilla 1.0 Does anyone know how I can make it appear right under the porfolio link every time? Thanks, Matt 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. Link: http://cemtec.quicksites.co.za CSS: http://cemtec.quicksites.co.za/wp-c...grass/style.css Hi This dropdown menu on Products works in Firefox but when I goto IE7 I dont see anything at all. I have tried changing the div Class to a Div Id also without any change. Anybody have any clues to what I have todo? L. Help!! I am trying to design this website: nitrocanine .com/D/DDesign and the dropdown menus won't work in IE, while they work in Chrome, Safari, Firefox... does anyone know how to make them work in IE as well?? You can view the source and see the css coding and the relevant HTML. 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 have been hunting around for an all CSS drop down menu that when you hover on the heading the menu expands down to show the heading 1 menu and if you hovered over the next menu item this expands to show that menu list instead a bit like the 'be the first to apply' on the right of this page, http://www.fish4.co.uk/iad/jobs search for say 'admin' just to get to the results page as this is where the menu is. the look is not important but the function is BUT.... i wanted to have many links in the drop down not just the one as in this example. this is the extracted code i have got so far that does what you see on this page. Code: <style> #rightcolumn { float: right; width: 170px; text-align: center; } #leftcolumn { float: left; width: 545px; padding: 10px; } h3#bftahead { text-align:left; color:#c1001f; font-size:1.5em; font-weight:bold; margin:23px 0px 10px 0px; } #bfta h4 { font-size:1.1em; margin:0em; padding:0.4em 0.1em 0.6em 0.1em } #bfta { width:170px; text-align:left; padding:0px; margin:0px 0px 10px 0px; list-style-type:none; height:47em; overflow:hidden; background:#ffffff url('images/bfta-background.jpg') bottom no-repeat; border-bottom:1px solid #cfcfcf; } #bfta li {float:left;width:100%;} #bfta li a { padding:0.5em 3%; display:block; width:94%; height:1.95em; margin-bottom:-0.4em; overflow:hidden; text-decoration:none; background:transparent url('images/bfta-background.png') no-repeat; color:#333333; font-family:arial, sans-serif; } #bfta li a#last, #bfta li a:hover {height:24em;} #bfta-whitebrand {list-style:none;margin:0em 0em 1em 1em;padding:0px;} #bfta-whitebrand li {padding:0em 0.4em;} </style> <div id="leftcolumn"> <ul id="bfta"> <li> <h4>a1</h4> a1 </li> <li><a href="a2"> <h4>a2</h4> a2</a> </li> <li><a href="a3"> <h4>a4</h4> a3</a> </li> </ul> </div> Need some help with some dropdown menus. I have been reading many of the tutorials on other sites. I have come up with this code for my drop down menus: Code: .dropmenu { position: absolute; left: -1500px; visibility: visible; z-index: 101; float: left; width: 122px; border-width: 1px; border-style: solid; border-color: #BFBFBF; background-color: #FFFFFF; } .dropmenu ul { margin: 0; padding: 0; list-style-type: none; } .dropmenu li { display: inline; } .dropmenu a, .dropmenu a:visited, .dropmenu a:active { display: block; width: 120px; padding: 2px; margin: 1px; font-family: Arial; font-size: 10px; font-weight: normal; text-align: center; text-decoration: none; color: #000000; background-color: #D4D4D4; } .dropmenu a:hover { padding: 2px; margin: 1px; font-family: Arial; font-size: 10px; font-weight: normal; text-align: center; text-decoration: none; color: #000000; background-color: #BFBFBF; } but no matter how much I adjust settings that I know, I cannot get the dropdowns to show up below my original buttons, they always show up to the right hand side. Can someone here please point me in the right direction... My second level menu items are not showing in IE, but show fine in firefox. Code: #menucontainer { width: 100%; clear: both; position: relative; text-align: center; margin: 0 auto; padding-left:0px; padding-top:35px; padding-bottom:15px; } #menu { text-align: center; display:table; padding:5; margin:0 auto; list-style-type:none; white-space:nowrap; background: #eee; } #menu ul { font: small-caps bold 12px/15px "lucida grande", tahoma, arial, verdana, sans-serif; list-style: none; margin: 0; padding: 0; width: 7em; float: left; } #menu a { 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 a { color: #C7C7C7; background: #000; text-transform: small-caps; } #menu a:hover { color: #fff; background: #000000; } /* ********* secondary links ************** */ #menu li li a { color: #C7C7C7; background: #292A2C; text-decoration: none; } #menu li li a:hover { color: #FFF; background: #292A2C; } #menu li:hover { z-index:1;} #menu li {position: relative} #menu ul ul { position: absolute; z-index:100; left:0; top:auto; display:none; } div#menu ul ul, div#menu ul li:hover ul ul {display: none;} div#menu ul li:hover ul, div#menu ul ul li:hover ul {display: block;} <!--[if IE]> <style type="text/css" media="screen"> body { behavior: url(behavior.htc); /* call hover behaviour file */ font-size: 100%; /* enable IE to resize em fonts */ } } #menu ul li a { height: 1%; /* make links honour display: block; properly */ } </style> <![endif]--> Hi all -- I've used plenty of CSS in the past, but I'm currently working on a dropdown menu that is more challenging than I had anticipated. A few things I need to fix that I just cannot figure out: 1) The last <li> in the dropdown seems to be overlapping my border 2) I want to put at least 10px of padding on the left hand side of the dropdown menu 3) I need to turn the carrot in front of each menu item to #ff9900 4) Whenever I try to increase or decrease the space between menu items, it seems as though white lines appear between my menu items. In the interest of full disclosure, I found this CSS out somewhere on the web, and I've been trying to customize it since I didn't feel I had the knowledge to build it from scratch. Normally, I'd prefer to create something on my own, but limited time and knowledge prevented me from doing so this time around. Attached below are my HTML and CSS code. I tried to post a link, but the forum will not allow me. If you can offer any assistance, I would greatly appreciate it. Thanks in advance for your time! HTML CODE: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Flyouts Page</title> <link rel="stylesheet" type="text/css" href="menu/menu_style.css" /> <body> <TABLE cellSpacing=0 cellPadding=0 width=610 border=0> <TBODY> <TR> <TD width="200" valign="top"> <div id="outside"> <ul id="navigation-1"> <li><IMG src="test_graphic.jpg" border=0></A> <ul class="navigation-2"> <li><a href="" title="Test 1" target="_self" ><strong>> Test 1</strong></a></li> <li><a href="" title="Test 2" target="_self" ><strong>> Test 2</strong></a></li> <li><a href="" title="Test 3" target="_self" ><strong>> Test 3</strong></a></li> <li><a href="" title="Test 4" target="_self" ><strong>> Test 4</strong></a></li> <li><a href="" title="Test 5" target="_self" ><strong>> Test 5</strong></a></li> <li><a href="" title="Test 6" target="_self" ><strong>> Test 6</strong></a></li> <li><a href="" title="Test 7" target="_self" ><strong>> Test 7</strong></a></li> </ul> </li> </ul> </div></TD> </TR> </TBODY></TABLE> </body> </html> CSS CODE: Code: #outside{ border:0px solid #000000; background:#ffffff; } #navigation-1 { padding:0px 0; margin:0px; list-style:none; width:200px; height:107px; border-top:0px solid #000000; border-bottom:0px solid #000000; font:normal 8pt Verdana, Arial, Helvetica; background:#ffffff; } #navigation-1 li { margin:0; padding:0; display:block; float:left; position:relative; width:200px; background:#ffffff; } #navigation-1 li a:link, #navigation-1 li a:visited { padding:4px 0; display:block; text-align:left; text-decoration:none; background:#ebf7f3; color:#000000; width:195px; background:#ffffff; } #navigation-1 li:hover a, #navigation-1 li a:hover, #navigation-1 li a:active { padding:4px 0; display:block; text-align:left; text-decoration:none; background:#ffffff; color:#000000; width:195px; } #navigation-1 li ul.navigation-2 { margin:0; padding:0px 0px 0; list-style:none; display:none; background:#ebf7f3; width:195px; position:absolute; top:110px; left:0px; border: 1px solid #cbccce; } #navigation-1 li:hover ul.navigation-2 { display:block; width:198px; } /*the individual menu items*/ #navigation-1 li ul.navigation-2 li { width:170px; height:18px; clear:left; font-size: 10px; font-family:Arial, Helvetica, sans-serif; } #navigation-1 li ul.navigation-2 li a:link, #navigation-1 li ul.navigation-2 li a:visited { clear:left; background:#ebf7f3; padding:4px 0px -4px 5px; width:170px; border:none; position:relative; z-index:1000; } #navigation-1 li ul.navigation-2 li:hover a, #navigation-1 li ul.navigation-2 li a:active, #navigation-1 li ul.navigation-2 li a:hover { clear:left; background:#ebf7f3; padding: 4px 0px 0-4px 5px; width:170px; position:relative; z-index:1000; color:#cbccce; } #navigation-1 li ul.navigation-2 li a span { position:absolute; top:0; left:132px; font-size:10pt; color:#000000; } #navigation-1 li ul.navigation-2 li:hover a span, #navigation-1 li ul.navigation-2 li a:hover span { position:absolute; top:0; left:190px; font-size:10pt; color:#cbccce; } .carrot{ color:#ff9900; } Hi I am trying to create a drop down menu on my existing design. Code: http://dfinnema.com/help How would I add a drop down to Page 3 menu that looks like this: Code: http://dfinnema.com/help/images/dropdown_active.png Without the menu: Code: http://dfinnema.com/help/images/dropdown.png Any Ideas / Suggestions? :| I have a CSS menu. How to I remove the RIGHT border for that last link item? I tried a bunch of stuff, I can change the colour of it but I can't seem to get rid of it. Quote: /* ------------------------------------ PVII Menu CSS Express Drop-Down Menu by Project Seven Development www.projectseven.com ------------------------------------ */ /*body { font-family: "Trebuchet MS", Arial, sans-serif; font-size: 100%; background-color: #FFFFFF; margin: 24px 0; padding: 0; background-image: url(images/p7exp_pbg.jpg); background-repeat: repeat-x; }*/ /* Container for the menu. We set top and bottom borders only because the menu container stretches the entire window width. Note that this container can go inside a fixed width element that is centered on the page, if you so desire. It can even go inside a table cell. It carries a background image for aesthetics. */ #menuwrapper { border-top: 1px solid #000; border-bottom: 1px solid #333; background-color: #FFFFFF; background-image: url(../images/menu_bg.gif); background-repeat: repeat-x; } /*Clears the floated menu items. Assigned to a BR tag placed just before menuwrapper's closing DIV tag*/ .clearit { clear: both; height: 0; line-height: 0.0; font-size: 0; } /* p7menubar is the root UL and p7menubar ul applies to all the sub-menu ULs. We set padding and margin to zero to eliminate all indentation, turn bullets off, and set a font-family different from the global font-family declared for the body element above. This sets font for just the menu. Do not add a font-size here. */ #p7menubar, #p7menubar ul { padding: 0; margin: 0; list-style: none; font-family: Arial, Helvetica, sans-serif; } /* Root-Level Links. Do not change the first two properties. Adjust padding values to make the root links taller and to offset them from the left and right edges of the link box. The border right creates a separator between links. Font-size is set here and will apply to all menu levels. Font color is set to light gray. */ #p7menubar a { display: block; text-decoration: none; border-right: 1px solid #333; font-size: 1em; color: #FFFFFF; padding-top: 5px; padding-right: 14px; padding-bottom: 5px; padding-left: 14px; } /* Class assigned to those Root-Level links that have associated Sub-Menus. The top and bottom padding assigned this element must be the same as that assigned to the p7menubar a element. The right padding is increased to accomodate the display of background image depicting a downward pointing arrow. */ #p7menubar a.trigger { padding: 5px 16px 5px 10px; background-image: url(../images/p7PM_dark_south.gif); background-repeat: no-repeat; background-position: right center; } /* The Root-Level list items. Floating left allows them to appear horizontally. Width is for IE5 Mac. The last rule in this style sheet will set the width for this element to auto for all other browsers - hiding it from IE5 Mac. The width is proportional. As you add and edit root menu items, you will need to test this width to ensure it is wide enough to accomodate all text. */ #p7menubar li { float: left; width: 9em; } /* Sets width for Sub-Menu box and the List Items inside - in proportional em units. This allows the sub-menu width to expand if users resize the text in their browsers. */ #p7menubar li ul, #p7menubar ul li { width: 12em; } /* The sub-menu links. We set color and turn off the right border, which would otherwise be inherited from the root link rule. We set top and bottom padding less than the root items and increas the left padding to indent the sub-menu links a small amount in from the root links. */ #p7menubar ul li a { color: #666666; border-right: 0; padding-top: 3px; padding-right: 12px; padding-bottom: 3px; padding-left: 16px; } /* Sub-Menu Unordered Lists describes each dropdown sub-menu grouping. Positioned Absolutely to allow them to appear below their root trigger. Set to display none to hide them until trigger is moused over. Background Color must be set or problems will be encountered in MSIE. Right and bottom borders are set to simulate a raised look. A gradient background image is assigned. */ #p7menubar li ul { position: absolute; display: none; background-color: #FFFFFF; border-right: 1px solid #333333; border-bottom: 1px solid #333333; background-image: url(../images/menu_bg_pulldown.gif); background-repeat: repeat-x; } /* Changes the Text color and background color when the Root-Level menu items are moused over. The second selector sets color and background when Root-Level items are accessed with the keyboard tab key. The third selector sets an active state to support keyboard access in MSIE. The fourth selector is assigned to IE5 and IE6 Windows via the P7_ExpMenu script. Note that IE7 supports hover on elements other than links and so behaves like Firefox, Opera, and Safari - making the menu operable even if JavaScript is not enabled. */ #p7menubar li:hover a, #p7menubar a:focus, #p7menubar a:active, #p7menubar li.p7hvr a { color: #000000; background-color: #999999; } /* Set the Sub-Menu UL to be visible when its associated Root-Level link is moused over. The second selector is assigned to IE5 and IE6 via the P7_ExpMenu script. */ #p7menubar li:hover ul, #p7menubar li.p7hvr ul { display: block; } /* Sets the Text color of the Sub-Level links when the Root-Level menu items are moused over. The second selector is assigned to IE5 and IE6 via the P7_ExpMenu script. The color set should march the normal Sub-Level link color in the rule: #p7menubar ul li a. The background color must be transparent to allow the underlying gradient background on the UL to show through. */ #p7menubar li:hover ul a, #p7menubar li.p7hvr ul a { color: #000000; background-color: transparent; } /* The normal hover class for Sub-Level links. The Important directive is required for older browsers. We set a background color, which shows over the gradient background. We set text color to white. */ #p7menubar ul a:hover { background-color: #606060!important; color: #FFFFFF!important; } /* The single backslash \ character inside this comment causes IE5 Mac to ignore the following rule, which allows other browsers to render top-level menu items to their natural width. Do not edit this rule in any way. */ #p7menubar li {width: auto;} I'm having a horrible time trying to figure out what is wrong with my dropdown menu. I cannot get it to work as it should in Internet Explorer, though it's fine in Firefox and Chrome. In Firefox, it is perfectly aligned to the center of the navigation bar, but in Internet Explorer, it is not and is elevated towards the top. In FF, there are links that dropdown under a few of the links when you hover over the initial link. This does not happen in IE. However, in both IE and FF, the background of the initial link turns dark green when you hover over it (as it should). Simply, I need the links in Internet Explorer look as they do in Firefox. I've gone through for days and tried to see what's wrong, but I can't think of anything. Here's the menu's CSS: Code: .menu { border:none; border:0px; margin:0px; padding-top: 5px; padding-left: 3px; font-family: Tahoma; font-size: 20px; } .menu ul { margin: 0px; padding: 0px; list-style: none; height: 35px; } .menu li { float: left; padding: 0px; } .menu li a { color: #000; line-height: 35px; display: block; padding: 0px 25px; text-align: center; text-decoration: none; margin:0px; } .menu li a:hover, .menu ul li:hover a { background: #919d21; color: #000; text-decoration: none; } .menu li ul { background: #919d21; display: none; height: auto; position: absolute; width: 150px; padding: 0px; border: 0px; margin: 0px; z-index: 200; /*top:1em; /*left:0;*/ } .menu li:hover ul { display: block; } .menu li li { width: 150px; margin:0px; padding:0px; display: block; float: none; } .menu li:hover li a { background: none; } .menu li ul a { display: block; height: 35px; font-size: 12px; font-style: normal; margin: 0px; padding: 0px 10px 0px 15px; text-align: left; } .menu li ul a:hover, .menu li ul li:hover a { background: #a7b235; border: 0px; color: #000; text-decoration: none; } .menu p { clear: left; } Here's the menu's HTML: Code: <ul> <li><a href="home.html"><img src="/images/icons/house.png" border="0">Home</a> <ul> <li><a href="home.html">Home</a></li> <li><a href="createacre.html">Acres</a></li> <li><a href="facilities.html">Facilities</a></li> <li><a href="inventory.html">Inventory</a></li> <li><a href="brand.html">Brand</a></li> <li><a href="shop.html">Shop</a></li> <li><a href="logout.html">Logout</a></li> </ul> </li> <li><a href="corral.html"><img src="/images/icons/world.png" border="0">Atlas</a> <ul> <li><a href="corral.html">Corral</a></li> <li><a href="shows.html">Shows</a></li> <li><a href="trade.html">Giving Center</a></li> <li><a href="jobpage.html">Employment Agency</a></li> <li><a href="store.html">General Store</a></li> <li><a href="searchvets.html">Veterinarian</a></li> <li><a href="traininglinks.html">Training</a></li> <li><a href="bank.html">Bank</a></li> </ul> </li> <li><a href="mbindex.html"><img src="/images/icons/comments.png" border="0">Interact</a> <ul> <li><a href="mbindex.html">Forum</a></li> <li><a href="chat.html">Chatroom</a></li> <li><a href="championshipboard.html">Championships</a></li> <li><a href="onlineusers.html">Online Players</a></li> <li><a href="http://www.paradigmprogrammingllc.com/community/">Community</a></li> </ul> </li> <li><a href="referrals.html"><img src="/images/icons/magnifier.png" border="0">Other</a> <ul> <li><a href="referrals.html">Referrals</a></li> <li><a href="search.html">Search AA</a></li> <li><a href="item_submission.html">Submit Image</a></li> <li><a href="goals.html">Goals</a></li> <li><a href="http://www.rpg.sg/vote.php?id=62">Vote for AA</a></li> </ul> </li> <li><a href="rules.html"><img src="/images/icons/shield.png" border="0">Help</a> <ul> <li><a href="rules.html">Rules</a></li> <li><a href="htmlhelper.html">HTML Helper</a></li> <li><a href="mods.html">Moderators</a></li> <li><a href="privacy.html">Privacy Policy</a></li> <li><a href="tos.html">Terms of Service</a></li> </ul> </li> <li><a href="userarea.html"><img src="/images/icons/newspaper.png" border="0">News</a> </li> <li><a href="upgrade.html"><img src="/images/icons/arrow_up.png" border="0">Upgrade</a> </li> </ul> I have a CSS dropdown menu with 1 sublevel which I want centered on my page. It looks fine when centered if I use Firefox, but in IE, the sublevels now pop out to the right of the main item and the 1st item doesnt show. Here's my CSS for IE: Code: div.menu { position:relative; height:30px; display:block; margin: 0 auto; text-align:left; } ul.menu { top:0px; left:0px; position:relative; padding:0px; margin: 0 auto; display:block; float:left; } ul.menu li { float:left; } ul.menu ul { position:relative; margin:0px; top:0px; left:0px; padding:0px; display:block; } ul.menu ul li { display:inline; float:none; position:relative; top:0px; left:0px; } a.menu { display:block; width:100px; height:30px; margin-top:-4px; } a.menu:hover { display:block; } And my HTML: Code: <body onload="MM_preloadImages('../Pictures/CoachesY.png','../Pictures/ScheduleY.png','../Pictures/RostersY.png','../Pictures/Sub Buttons/CoachHenriottY.jpg','../Pictures/Sub Buttons/CoachWitteY.jpg','../Pictures/Sub Buttons/CoachSchneiderY.jpg','../Pictures/Sub Buttons/CoachReevesY.jpg','../Pictures/Sub Buttons/FreshmanY.jpg','../Pictures/Sub Buttons/JVY.jpg','../Pictures/Sub Buttons/VarsityY.jpg','../Pictures/CampsY.png','../Pictures/SummerInfoY.png','../Pictures/LinksY.png','../Pictures/YouthInfoY.png','../Pictures/DirectionsY.png')" align="center"> <table width="690" align="center" bgcolor=#8560A9> <tr><td bordercolor="#FFFFFF" bgcolor="#8560A9"> <table width="690" border="0" align="center"> <tr bgcolor="#FFFFFF" height="227"> <td height="15" bgcolor="#8560A9"><div id="center"><img src="../Pictures/TitlePhoto.jpg" alt="Lady Elks Basketball" width="800" height="200" /><br /> <div class="menu"> <ul class="menu"> <li><a class="menu" href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image1','','../Pictures/CoachesY.png',1)"><img src="../Pictures/CoachesP.png" name="Image1" width="100" height="30" border="0" id="Image1" /></a> <ul> <li><a class="menu" href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image4','','../Pictures/Sub Buttons/CoachHenriottY.jpg',1)"><img src="../Pictures/Sub Buttons/CoachHenriottP.jpg" name="Image4" width="100" height="30" border="0" id="Image4" /></a></li> <li><a class="menu" href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image5','','../Pictures/Sub Buttons/CoachWitteY.jpg',1)"><img src="../Pictures/Sub Buttons/CoachWitteP.jpg" name="Image5" width="100" height="30" border="0" id="Image5" /></a></li> <li><a class="menu" href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image6','','../Pictures/Sub Buttons/CoachSchneiderY.jpg',1)"><img src="../Pictures/Sub Buttons/CoachSchneiderP.jpg" name="Image6" width="100" height="30" border="0" id="Image6" /></a></li> <li><a class="menu" href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image7','','../Pictures/Sub Buttons/CoachReevesY.jpg',1)"><img src="../Pictures/Sub Buttons/CoachReevesP.jpg" name="Image7" width="100" height="30" border="0" id="Image7" /></a></li> </ul> </li> </ul> <ul class="menu"> <li><a class="menu" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image2','','../Pictures/ScheduleY.png',1)"><img src="../Pictures/ScheduleP.png" name="Image2" width="100" height="30" border="0" id="Image2" /></a> <ul> <li><a class="menu" href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image8','','../Pictures/Sub Buttons/FreshmanY.jpg',1)"><img src="../Pictures/Sub Buttons/FreshmanP.jpg" name="Image8" width="100" height="30" border="0" id="Image8" /></a></li> <li><a class="menu" href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image9','','../Pictures/Sub Buttons/JVY.jpg',1)"><img src="../Pictures/Sub Buttons/JVP.jpg" name="Image9" width="100" height="30" border="0" id="Image9" /></a></li> <li><a class="menu" href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image10','','../Pictures/Sub Buttons/VarsityY.jpg',1)"><img src="../Pictures/Sub Buttons/VarsityP.jpg" name="Image10" width="100" height="30" border="0" id="Image10" /></a></li> </ul> </li> </ul> <ul class="menu"> <li> <a class="menu" href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image3','','../Pictures/RostersY.png',1)"><img src="../Pictures/RostersP.png" name="Image3" width="100" height="30" border="0" id="Image3" /></a> <ul> <li><a class="menu" href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image13','','../Pictures/Sub Buttons/FreshmanY.jpg',1)"><img src="../Pictures/Sub Buttons/FreshmanP.jpg" name="Image13" width="100" height="30" border="0" id="Image13" /></a></li> <li><a class="menu" href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image12','','../Pictures/Sub Buttons/JVY.jpg',1)"><img src="../Pictures/Sub Buttons/JVP.jpg" name="Image12" width="100" height="30" border="0" id="Image12" /></a></li> <li><a class="menu" href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image11','','../Pictures/Sub Buttons/VarsityY.jpg',1)"><img src="../Pictures/Sub Buttons/VarsityP.jpg" name="Image11" width="100" height="30" border="0" id="Image11" /></a></li> </ul> </li> </ul> <ul class="menu"> <li><a class="menu" href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image14','','../Pictures/CampsY.png',1)"><img src="../Pictures/CampsP.png" name="Image14" width="100" height="30" border="0" id="Image14" /></a></li> </ul> <ul class="menu"> <li><a class="menu" href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image15','','../Pictures/SummerInfoY.png',1)"><img src="../Pictures/SummerInfoP.png" name="Image15" width="100" height="30" border="0" id="Image15" /></a></li> </ul> <ul class="menu"> <li><a class="menu" href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image16','','../Pictures/LinksY.png',1)"><img src="../Pictures/LinksP.png" name="Image16" width="100" height="30" border="0" id="Image16" /></a></li> </ul> <ul class="menu"> <li><a class="menu" href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image17','','../Pictures/YouthInfoY.png',1)"><img src="../Pictures/YouthInfoP.png" name="Image17" width="100" height="30" border="0" id="Image17" /></a></li> </ul> <ul class="menu"> <li><a class="menu" href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image18','','../Pictures/DirectionsY.png',1)"><img src="../Pictures/DirectionsP.png" name="Image18" width="100" height="30" border="0" id="Image18" /></a></li> </ul> </div><br /> </div> </td> </tr> </table> </td></tr></table> </div> </body> Any help would be appreciated. Hi, Been trying to change mine, searching for a new one, however cant find any good and recomended. I need a dropdownmenu only using css would be ideal, but can have javascript to cover browsers such as ie6 and smartphones etc. I dont care anymore if its a hover or an onclick menu anymore, the most important is that it works in most possible devices. Please help, any links? Thanks, |