CSS - Drop Down Link
Hello
I once had a vertical navigation menu that would do a tree drop down. I believe it was done in CSS. If this can be done can anyone direct me to some good links? need to look something link this: Toys |_girl |_Boy Beds thanks for the help. If this needs javascript just tell me so and I can do that as well. Similar TutorialsHello there, im new to the forums. decided to register because im having a bit of a problem with CSS/HTML.(pretty inexperienced with css). Heres what i wanna do: I have a social website where users can register and comment on things etc. I want to show a drop down menu as soon as users hover their mouse over a user name. So i took this script: http://javascript-array.com/scripts...drop_down_menu/ And modified it. But i cant figure out how to make it work if the user name is surrounded with other text, it automatically creates a new line. Heres my code: Code: <html> <head> <style> <!-- #sddm a { display: block; } #sddm span { position: absolute; visibility: hidden; margin: 0; padding: 0; background: #3D97D6; border: 1px solid #5970B2} #sddm span a { position: relative; display: block; margin: 0; padding: 5px 10px; width: auto; white-space: nowrap; text-align: left; text-decoration: none; background: #3D97D6; color: #FFF; font: 11px arial} #sddm span a:hover { background: #2875DE; color: #FFF} --> </style> <script type="text/javascript"> // Copyright 2006-2007 javascript-array.com var timeout = 500; var closetimer = 0; var ddmenuitem = 0; // open hidden layer function mopen(id) { // cancel close timer mcancelclosetime(); // close old layer if(ddmenuitem) ddmenuitem.style.visibility = 'hidden'; // get new layer and show it ddmenuitem = document.getElementById(id); ddmenuitem.style.visibility = 'visible'; } // close showed layer function mclose() { if(ddmenuitem) ddmenuitem.style.visibility = 'hidden'; } // go close timer function mclosetime() { closetimer = window.setTimeout(mclose, timeout); } // cancel close timer function mcancelclosetime() { if(closetimer) { window.clearTimeout(closetimer); closetimer = null; } } // close layer when click-out document.onclick = mclose; </script> </head> <body> <span id="sddm"> <a href="#" onmouseover="mopen('m1')" onmouseout="mclosetime()">This is a username</a> <span id="m1" onmouseover="mcancelclosetime()" onmouseout="mclosetime()"> <img src="linktoav" alt="avatar" /> <font color="#ffffff"><b>Koen</b></font></a> <a href="#">Add as Friend</a> <a href="#">Send message</a> <a href="#">View Profile</a> <a href="#">Report</a> </span> </span> this text comes after the username </body> </html> So i hope its clear what i wanna do, i always find it hard to explain things Hello all, I'm trying to fix my drop down so it goes straight down. I originally had it so it was reading the javascript but after adjusting it quite a bit, it spans the whole parent nav bar and is completely in css. I don't mind that it's in css but I want visitors to be able to see it in ie because ie own's a good 75% of the browser population. Here is my site, i still have the javascript file in there but it doesn't do anything anymore. Any clues on how to get it so it goes straight down and is viewable in ie? Site Hey guys , I am looking to convert my css3 vertical nav bar , from the order of "DROP DOWN" to "DROP UP" . The code i am using below is from a css3 gen. If anybody could show me what values to change it would be greatly appreciated , Code: ul#css3menu,ul#css3menu ul{ margin:0;list-style:none;background-color:#000000; background-image:-moz-linear-gradient(50% 0%,rgba(255,255,255,0.38),rgba(255,255,255,0.16));background-image:-webkit-gradient(linear,50% 0%,50% 100%,from(rgba(255,255,255,0.38)),to(rgba(255,255,255,0.16)));background-repeat:repeat;border-width:1px;border-style:solid;border-color:#343434;-moz-border-radius:50px;-webkit-border-radius:50px;border-radius:50px;-moz-box-shadow:1.4px 1px 2px #B1B1B1;-webkit-box-shadow:1.4px 1px 2px #B1B1B1;box-shadow:1.4px 1px 2px #B1B1B1;} ul#css3menu ul{ display:none;position:absolute;left:-1px;top:98%;padding:0;background-color:#202020; background-image:-moz-linear-gradient(50% 0%,rgba(255,255,255,0.16),rgba(255,255,255,0));background-image:-webkit-gradient(linear,50% 0%,50% 100%,from(rgba(255,255,255,0.16)),to(rgba(255,255,255,0)));border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px;border-color:#000000;} ul#css3menu li:hover>*{ display:block;} ul#css3menu li:hover{ position:relative;} ul#css3menu ul ul{ position:absolute;left:98%;top:-2px;} ul#css3menu{ padding:6px 6px 6px 0;display:block;font-size:0;position:absolute;z-index:1000;left:10px;top:10px;} ul#css3menu li{ display:block;white-space:nowrap;font-size:0;float:left;} ul#css3menu>li,ul#css3menu li{ margin:0 0 0 6px;} ul#css3menu ul>li{ margin:6px 0 0;} ul#css3menu a:active, ul#css3menu a:focus{ outline-style:none;} ul#css3menu a{ display:block;vertical-align:middle;text-align:left;text-decoration:none;font:12px Arial,sans-serif;color:#E7E5E5;cursor:pointer;padding:8px 20px;background-color:;border-width:0;border-style:solid;border-color:transparent;} ul#css3menu ul li{ float:none;margin:0;} ul#css3menu ul a{ text-align:left;} ul#css3menu li:hover>a{ background-color:#7ACF27;border-color:#F8F8F8;border-style:solid;font:12px Arial,sans-serif;color:#333;text-decoration:none; background-image:-moz-linear-gradient(50% 0%,rgba(255,255,255,0.38),rgba(85,170,0,0.7));background-image:-webkit-gradient(linear,50% 0%,50% 100%,from(rgba(255,255,255,0.38)),to(rgba(85,170,0,0.7)));filter:progid:DXImageTransform.Microsoft.g radient(gradientType=0,startColorstr=#60FFFFFF,endColorstr=#B355AA00)} ul#css3menu img{ border:none;vertical-align:middle;margin-right:16px;width:16px;height:16px;} ul#css3menu ul img{ width:16px;height:16px;} ul#css3menu img.over{ display:none;} ul#css3menu li:hover > a img.def{ display:none;} ul#css3menu li:hover > a img.over{ display:inline;} ul#css3menu ul span{ background-image:none;padding-right:16px;} ul#css3menu li.topitem>a{ background-color:traspar;border-width:1px 0 0 0;border-style:solid;border-color:;border-radius:50px;-moz-border-radius:50px;-webkit-border-radius:50px;font:bold 13px Arial,sans-serif;color:#E7E5E5;text-decoration:none;text-shadow:0 1px 1px #000000;} ul#css3menu li.topitem:hover>a{ background-color:#00ff00; background-image:-moz-linear-gradient(50% 0%,rgba(255,255,255,0.77),rgba(85,170,0,0.7));background-image:-webkit-gradient(linear,50% 0%,50% 100%,from(rgba(255,255,255,0.77)),to(rgba(85,170,0,0.7)));border-style:solid;border-color:#F8F8F8;font:bold 13px Arial,sans-serif;color:#444444;text-decoration:none;text-shadow:0 1px 0 #C5EAA1;filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr=#C6FFFFFF,end Colorstr=#B355AA00)} ul#css3menu li.subfirst>a{ border-radius:9px 9px 0 0;-moz-border-radius:9px 9px 0 0;-webkit-border-radius:9px 9px 0 0;} ul#css3menu li.sublast>a{ border-radius:0 0 9px 9px;-moz-border-radius:0 0 9px 9px;-webkit-border-radius:0 0 9px 9px;} And here is the html Code: <ul id="css3menu"> <li class="topitem"><a href="#" title="Item 0"><span>Item 0</span></a> <ul> <li class="subfirst"><a href="#" title="Item 0 0"><span>Item 0 0</span></a> <ul> <li class="sublast"><a href="#" title="Item 0 0 0">Item 0 0 0</a></li> </ul> </li> <li><a href="#" title="Item 0 1"><span>Item 0 1</span></a> <ul> <li class="sublast"><a href="#" title="Item 0 1 0">Item 0 1 0</a></li> </ul> </li> <li><a href="#" title="Item 0 2"><span>Item 0 2</span></a> <ul> <li class="sublast"><a href="#" title="Item 0 2 0">Item 0 2 0</a></li> </ul> </li> <li><a href="#" title="Item 0 3"><span>Item 0 3</span></a> <ul> <li class="sublast"><a href="#" title="Item 0 3 0">Item 0 3 0</a></li> </ul> </li> <li><a href="#" title="Item 0 4"><span>Item 0 4</span></a> <ul> <li class="sublast"><a href="#" title="Item 0 4 0">Item 0 4 0</a></li> </ul> </li> <li><a href="#" title="Item 0 5"><span>Item 0 5</span></a> <ul> <li class="sublast"><a href="#" title="Item 0 5 0">Item 0 5 0</a></li> </ul> </li> <li><a href="#" title="Item 0 6"><span>Item 0 6</span></a> <ul> <li class="sublast"><a href="#" title="Item 0 6 0">Item 0 6 0</a></li> </ul> </li> <li><a href="#" title="Item 0 7"><span>Item 0 7</span></a> <ul> <li class="sublast"><a href="#" title="Item 0 7 0">Item 0 7 0</a></li> </ul> </li> <li><a href="#" title="Item 0 8"><span>Item 0 8</span></a> <ul> <li class="sublast"><a href="#" title="Item 0 8 0">Item 0 8 0</a></li> </ul> </li> <li><a href="#" title="Item 0 9"><span>Item 0 9</span></a> <ul> <li class="sublast"><a href="#" title="Item 0 9 0">Item 0 9 0</a></li> </ul> </li> <li><a href="#" title="Item 0 10"><span>Item 0 10</span></a> <ul> <li class="sublast"><a href="#" title="Item 0 10 0">Item 0 10 0</a></li> </ul> </li> <li><a href="#" title="Item 0 11"><span>Item 0 11</span></a> <ul> <li class="sublast"><a href="#" title="Item 0 11 0">Item 0 11 0</a></li> </ul> </li> <li><a href="#" title="Item 0 12"><span>Item 0 12</span></a> <ul> <li class="sublast"><a href="#" title="Item 0 12 0">Item 0 12 0</a></li> </ul> </li> <li class="sublast"><a href="#" title="Item 0 13"><span>Item 0 13</span></a> <ul> <li class="sublast"><a href="#" title="Item 0 13 0">Item 0 13 0</a></li> </ul> </li> </ul> </li> </ul> This is probably a tall order any advice is appreciated , TYVM PROBLEM: I create a nice button using the sliding doors technique for rounded corners. But the button displays with 100% width unless I float it. My layout requires that the buttons be inline with the text, so floating won't work. Anyone know an alternative? I wouldn't mind floating but I want the button to show inline with the text. When I use float:left, it removes it from the inline flow. Basically, I want a very modular button that can be used in several different places on a page. In many cases, floating is fine because the mockup has it out of the inline text, but I want to use it there, too. Here's the HTML: <a class="button" href="#"><span>Update Profile</span></a> Here's the css: a.button:link, a.button:visited { background:url(button_right.gif) no-repeat right top; } a.button span:hover, a.button span:active { background:url(button_left_hover.gif) no-repeat right top; } a.button span { background:url(button_left.gif) no-repeat left top; color:#fff; cursorointer; display:block; height:20px; line-height:20px; margin:0 2px 0 0; padding:0 10px; position:relative; white-space:nowrap; } http://tinyurl.com/5llwfl I'm having some problems with this page in particular. Try clicking on one of the Left or Right white image arrows below the main picture. This only occurs in Firefox 2.x. Once you click the link, the content area below "Starting from $278.497" should shift roughly 5 pixels down. I thought it may be related to the dotted link outline that surrounds the image, but that was not the case. I applied styles to get rid of that and there was no changes. I also thought it may be related to a position:relative; bug which this site has been notorious for. I tried making certain divs in that area position:relative to no avail. So to test further I tried an overall #content *{position:relative;} fix which could not fix the position shift, either. I'm not sure what else it could be. And while I do have access to the build of this app, I have not been able to reproduce the issue by downloading all HTML, CSS, and image files locally. Hello Is there a way i can restore my <a href> link back to its original color, that is before the a:visited event, when I click on another link? PS. no Javascript code needed, is their an alternative in css? I have my links defined with a dashed border, but I don't want this on linked images and I'm trying to figure out if I can accomplish this with CSS only without additional markup in my HTML file. Here is a sample file: http://www. shawkey.com/test/imagebordertest.html Any suggestions on how I can get the dashed border to not appear below the image and only appear below the text with just CSS? Hello everyone, I have a drop-down menu that is currently working well. The only change I need to make is to have the right edge of the drop-down menu to align with the right edge of the parent menu. When you hover over the menu, it currently "drops" down and to the right, with the left edges aligned. I want the menu to "drop" down and to the left, so the right edges are aligned. I have tried fiddling with floats and absolute/relative positioning. I'm not sure what needs to be changed. Any help you can provide is greatly appreciated! I'm learning via "cut and paste", so please go easy on any terminology you may use. Thank you! Here is the page: http://www.littlebuddymedia.com/site05/012.html The menu currently drops like this (aligned along the left edge): http://www.justskins.com/wp-content/uploads/2008/12/drop-down-menu.gif I want the menu to do this (align along the right edge; see how "Artists" is aligned under "Music" along the right edge): http://artatm.com/wp-content/uploads/2009/11/mtvmenu.JPG Here is my code: Code: .chromestyle{ width: 100%; font-weight: bold; float: left; height: 29px; } .chromestyle:after{ /*Add margin between menu and rest of content in Firefox*/ content: "."; display: block; height: 0; clear: both; visibility: hidden; } .chromestyle ul{ border: 0px solid #BBB; width: 100%; background: url(chromebg.gif) center center repeat-x; /*THEME CHANGE HERE*/ padding: 4px 0; margin: 0; text-align: right; /*set value to "left", "center", or "right"*/ } .chromestyle ul li{ display: inline; } .chromestyle ul li a{ color: #000000; padding: 4px 7px; margin: 0; text-decoration: none; border-left: 1px solid #DADADA; } .chromestyle ul li a:hover, .chromestyle ul li a.selected{ /*script dynamically adds a class of "selected" to the current active menu item*/ background: url(chromebg-over.gif) center center repeat-x; /*THEME CHANGE HERE*/ } /* ######### Style for Drop Down Menu ######### */ .dropmenudiv{ position:absolute; top: 0; border: 1px solid #BBB; /*THEME CHANGE HERE*/ border-bottom-width: 0; font:normal 12px Verdana; line-height:18px; z-index:100; background-color: white; width: 200px; visibility: hidden; } .dropmenudiv a{ width: auto; display: block; text-indent: 3px; border-bottom: 1px solid #BBB; /*THEME CHANGE HERE*/ padding: 2px 5px; text-decoration: none; font-weight: bold; color: black; } * html .dropmenudiv a{ /*IE only hack*/ width: 100%; } .dropmenudiv a:hover{ /*THEME CHANGE HERE*/ background-color: #0000ff; color: #fff200; } Hello is there a way to make it so hyperlinks are not decorated as the default blue? I have the following css which I've attempted to make it so the text '.com' is always white, but it defaults to the standard link color. html: <td class="nodecoration"><a class="nodecoration" href="http://www.somesite.com">.com</a></td> css: Code: td.nodecoration { background-color: #003399; color: white; width: 120px; height: 30px; font-family: "Verdana", sans-serif; font-size: 25px; font-weight: bold; text-align:center; } A:link.nodecoration {text-decoration: none} A:visited.nodecoration{text-decoration:none} A:active.nodecoration{text-decoration:none} a:hover.nodecoration{text-decoration:underline} Hey guys im having a really big problem with my site. It shows up fine in every browser except the old version of any IE. Can you guys help me out. the problem image is attached.URL Here's the HTML code: Code: <tr> <td> <div id="wrapper"> <div id="navMenu"> <ul> <li><a href="home.html">Home</a> <ul> </ul> <!-- end inner UL --> </li> <!-- end main LI --> </ul> <!-- end main UL --> <ul> <li><a href="aboutus.html">About</a> <ul> </ul> <!-- end inner UL --> </li> <!-- end main LI --> </ul> <!-- end main UL --> <ul> <li><a href="aboutvictoria.html">Victoria</a> <ul> <li><a href="victoriastilwellarticle.html">Articles</a></li> <li><a href="philosophy.html">Philosophy</a></li> <li><a href="vspdt.html">VSPDT</a></li> </ul> <!-- end inner UL --> </li> <!-- end main LI --> </ul> <!-- end main UL --> <ul> <li><a href="photos.html">Photos</a> <ul> </ul> <!-- end inner UL --> </li> <!-- end main LI --> </ul> <!-- end main UL --> <ul> <li><a href="links.html">Links</a> <ul> </ul> <!-- end inner UL --> </li> <!-- end main LI --> </ul> <!-- end main UL --> <ul> <li><a href="trainingprograms.html">Training</a> <ul> <li><a href="trainingmethods.html">Methods</a></li> <li><a href="whyreinforcement.html">Positive(+R)</a></li> <li><a href="class.html">C.L.A.S.S</a></li> </ul> <!-- end inner UL --> </li> <!-- end main LI --> </ul> <!-- end main UL --> <ul> <li><a href="http://dynamitedogtraining.blogspot.com/">Blog</a> <ul> </ul> <!-- end inner UL --> </li> <!-- end main LI --> </ul> <!-- end main UL --> <ul> <li><a href="contact.html">Contact</a> <ul> </ul> <!-- end inner UL --> </li> <!-- end main LI --> </ul> <!-- end main UL --> <br class="clearFloat" /> </div> <!-- end navMenu --> </div> <!--end wrapper --> </td> </tr> And here's the CSS code: Code: #navMenu { margin:0; width:auto; background-image: url(images/Home_top_06.jpg); padding:0; } #navMenu ul { margin:0; padding:0; line-height:30px; background-color: #333; } #navMenu li { margin:0; padding:0; list-style:none; float:left; position:relative; } #navMenu ul li a { text-align:center; height:36px; width:70px; display:block; font-family:"Comic Sans MS", cursive; text-decoration:none; color:#FFF; text-shadow:0; font-size: 15px; font-variant: normal; } #navMenu ul ul { visibility:hidden; top:32px; width: 120px; font-style: italic; position: absolute; margin-left: -20px; text-indent: 9px; text-align: center; } #navMenu ul li:hover ul { visibility:visible; z-index:9999; } /**********************************************/ /*sets top level hover color*/ #navMenu li:hover { font-weight: bold; font-style: italic; } /*sets link items hover color and background*/ #navMenu ul li:hover ul li a:hover { color:#000; background-color: #E71923; width: 120px; } /* Changes text color on hover for main menu hover*/ #navMenu a:hover { color:#FFF; } /* Contains the Float */ .clearFloat { clear:both; margin:0; padding:0; } #navMenu #holder ul li{ display:inline; float:left; clear:left; } Please if you guys can help it would be awesome thank you Hi there, First I should mention, I have been doing a lot of research to learn CSS, and this is basically the first time implementing it for my company's website. I have A LOT to learn still! I'm using Dreamweaver MX and MX 2004 (2004 seems to keep crashing on me today, and i can't run it)...anyways... I am working on a dropdown menu using pure CSS....WHICH is a library item that I am dropping into a table cell below the top banner on the index page, and others. However, I'm having problems with some styling and the best way to work some things. First, if you click he Interface I hope someone can help me!! I'm so frustrated! You can see HOW I want the nav to look. I seem to have a problem with the aligning of the text, as well as roll over effects: basically, I would like my nav button to turn blue w/ white text. And I'd like to have my buttons closer together, having it look as close as possible to my interface img above. Also having issues w/ IE...which I assume would happen. Here is my CSS and HTML code (remember, no body or title tags because it's an lbi item: <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style> #nav, #nav ul { padding: 0; margin: 0; list-style: none; } #nav a { display: block; width: 10em; color: rgb(0,50,94); font-family: Arial, Helvetica, sans-serif; font-size: 11px; text-decoration: none; } #nav li { float: left; width: auto; } #nav li ul { position: absolute; background: #C5D1DC; width: 10em; left: -999em; margin: 3px; border: 1px solid rgb(0,50,94); padding:5px; } #nav li:hover ul, #nav li.sfhover ul { left: auto; } .button { background-color: #C5D1DC; padding: 3px; border-top: 1px solid #003A66; border-right: 0px solid #003A66; border-bottom: 1px solid #003A66; border-left: 0px solid #003A66; } </style> <script type="text/javascript"><!--//--><![CDATA[//><!-- sfHover = function() { var sfEls = document.getElementById("nav").getElementsByTagName("LI"); for (var i=0; i<sfEls.length; i++) { sfEls[i].onmouseover=function() { this.className+=" sfhover"; } sfEls[i].onmouseout=function() { this.className=this.className.replace(new RegExp(" sfhover\\b"), ""); } } } if (window.attachEvent) window.attachEvent("onload", sfHover); //--><!]]></script> <ul id="nav"> <li class="button"><a href="#">Products</a> <ul> <li cla><a href="#">Audio</a></li> <li><a href="#">Video</a></li> <li><a href="#">Home Automation</a></li> <li><a href="#">Lighting</a></li> <li><a href="#">PDF Downloads</a></li> <li><a href="#">Part Index</a></li> </ul> </li> <li class="button"><a href="#">News and Events </a> <ul> <li><a href="#">New Products</a></li> <li><a href="#">User Profile</a></li> <li><a href="#">Company</a></li> <li><a href="#">Tradeshows</a></li> <li><a href="#">Newsletter</a></li> </ul> </li> <li class="button"><a href="#">Order</a> <ul> <li><a href="#">Distributor List</a></li> </ul> </li> <li class="button"><a href="#">Corporate</a> <ul> <li><a href="#">Company Bio</a></li> </ul> </li> <li class="button"><a href="#">Technical Resources</a> <ul> <li><a href="#">Connector Cross Reference</a></li> <li><a href="#">Wire Gage</a></li> <li><a href="#">Glossary</a></li> </ul> </li> </ul> (IF you need me to, I can send you my site files over email) I really really appreciate all the help you guy's can give me! I'm on a tight deadline, and I really want to use CSS. If I can't get this to work, I have to take out the drop down menu all together and go w/ a boring static menu system that will add in numerous extra pages.... THANKS! Valerie Hi, I'm trying to get this drop down to work in IE, but I'm not exactly sure what the problem is, can anyone help me? idatedsatan . net / ewzine / index.html Thanks. I've tried so many things and can't get it right so I erased what I originally had to show all. Code: <div id="main-nav"> <ul> <li><a href="#"><img src="images/btn-roster.jpg" alt="Roster" width="71" height="36" border="0"></a></li> <li><a href="#"><img src="images/btn-events.jpg" alt="Events" width="75" height="36" border="0"></a></li> <li><a href="#"><img src="images/btn-multimedia.jpg" alt="Multimedia" width="108" height="36" border="0"></a></li> <li><a href="#"><img src="images/btn-info.jpg" alt="Info" width="61" height="36" border="0"></a></li> </ul> </div> Code: @charset "windows-1252"; body { background: #0a0d12; text-align: center; padding: 0px; margin: 0px; } .main { width:1027px; margin:0px auto; padding:0px; border-left: 1px solid #000000; border-right: 1px solid #000000; border-top: 0px; border-bottom: 0px; } .header { width: 1027px; height: 146px; background: #0a0d12 url(../images/header.jpg); border: 0px; margin: 0px; padding: 50px 130px 0px 0px; } .leftside { width: 110px; height: 825px; background:url(../images/left-side.jpg) right top no-repeat #0a0d12; padding: 0; margin: 0; } .rightside { width: 110px; height: 825px; background:url(../images/right-side.jpg) left top no-repeat #0a0d12 ; padding: 0; margin: 0; border:0px; } .contentarea { color: #eeeeee; width: 803px; height: 692px; background: #0a0c0d; text-align: left; vertical-align: top; border-left: 2px solid #000000; border-right: 2px solid #000000; border-top: 0px; border-bottom: 0px; margin: 0px; padding: 0px; float:left; } .footer { width: 807px; height: 133px; color: #eeeeee; text-align: center; vertical-align: top; background:url(../images/footer.jpg) center top repeat; padding: 0; margin: 0; } a img,:link img,:visited img { border:none } a {outline:none;} .footer a { margin:0px; padding:0px 10px; text-decoration:none; font:bold 12px/18px Arial, Helvetica, sans-serif; color:#fff;} .top-banner { width:312px; height:69px; background:#313A47; float:right; margin:0px; padding:0px; border:1px solid #000;} #main-nav { width:805px; height:59px; margin:0px; padding:0px; float:left; background:url(../images/top-nav-bg.jpg) left top no-repeat;} #main-nav ul { width:350px; height:39px; margin:9px 10px 0 0; padding:0px; float:right;} #main-nav ul li { margin:0px; padding:0 4px 0 0px; float:left; list-style:none;} #main-nav ul li a { border:none;} *html #main-nav ul li { margin:0 0px 0 5px; padding:0px; float:left; list-style:none;} #left-box { width:168px; height:629px; float:left; margin:0px; padding:2px;/* background:#ccc;*/} .quote { width:168px; height:97px; float:left; margin:11px 0 0 0; padding:0px; background:#2D3542;} .quote img { float:left; margin:3px 0 0 5px; padding:0px;} .quote h3 { width:168px; height:27px; float:left; margin:0px; padding:0px; background:url(../images/box-head-bg.jpg) left top no-repeat;} .quote-content { width:164px; height:70px; float:left; margin:0px; padding:0px; border:2px solid #090B0B; border-top:none; } *html .quote-content { width:168px; height:70px; float:left; margin:0px; padding:0px; border:2px solid #090B0B; border-top:none; } .quote-content p { margin:0px; padding:5px; text-align:center; font:bold 12px/16px Arial, Helvetica, sans-serif; color:#fff;} .quote-content p b { margin:0px; padding:0px; text-align:right; font:bold 12px/16px Arial, Helvetica, sans-serif; color:#c00;} .spotlight { width:168px; height:202px; float:left; margin:20px 0 0 0; padding:0px; background:#2D3542;} .spotlight h3 { width:168px; height:25px; float:left; margin:0px; padding:2px 0 0 5px; background:url(../images/box-head-bg.jpg) left top no-repeat;} .spotlight-content { width:164px; height:175px; float:left; margin:0px; padding:0px; border:2px solid #090B0B; border-top:none; } *html .spotlight-content { width:168px; height:175px; float:left; margin:0px; padding:0px; border:2px solid #090B0B; border-top:none; } .spotlight-content h4 { margin:0px; padding:5px; text-align:center; font:bold 11px/12px Arial, Helvetica, sans-serif; color:#fff;} .spotlight-content p { margin:0px; padding:2px 5px; text-align:left; font:normal 10px/11px Arial, Helvetica, sans-serif; color:#fff;} .spotlight-content img { margin:0 0 0 20px; padding:2px 0px; text-align:center; float:left; font:normal 10px/12px Arial, Helvetica, sans-serif; color:#fff;} .opinion { width:168px; height:270px; float:left; margin:15px 0 0 0; padding:0px; background:#2D3542;} .opinion h3 { width:168px; height:23px; float:left; margin:0px; padding:4px 0 0 5px; background:url(../images/box-head-bg.jpg) left top no-repeat;} .opinion-content { width:164px; height:243px; float:left; margin:0px; padding:0px; border:2px solid #090B0B; border-top:none; } *html .opinion-content { width:168px; height:248px; float:left; margin:0px; padding:0px; border:2px solid #090B0B; border-top:none; } .opinion-content p { float:left; margin:0px; padding:10px 5px; text-align:left; font:bold 11px/18px Arial, Helvetica, sans-serif; color:#fff; } .opinion-content form { float:left; margin:0px; padding:10px 5px 0px 5px; text-align:left; font:bold 11px/18px Arial, Helvetica, sans-serif; color:#fff; } .opinion-content form label { float:left; margin:5px 0 0 30px; padding:0px; width:50px;font:bold 12px/18px Arial, Helvetica, sans-serif; color:#fff; } .opinion-content form input { float:left; margin:5px 0 0 0; padding:0px; } .opinion-content img { margin:0 0 0 40px; padding:0px;} .opinion-content img a { margin:0 0 0 40px; padding:0px; border:none;} #content-box { width:450px; height:623px; float:left; margin:0px; padding:5px;} .content-banner { width: 446px; height: 95px; float:left; margin:0px; padding:2px; } .content-banner img { text-align:center; } .site-news { width:452px; height:218px; float:left; margin:0px; padding:0px; } .site-news h2 { width:452px; height:23px; float:left; margin:0px; padding:8px 0 0 10px; background:url(../images/content-box-head-bg.jpg) left top no-repeat; } *html .site-news h2 { height:31px;} .site-news-content { width:448px; height:182px; float:left; margin:0px; padding:0px; background:url(../images/box-content-bg.jpg) left top repeat-x #090A0A; border:2px solid #090B0B; border-top:none;} *html .site-news-content { width:452px; height:182px; float:left; margin:0px; padding:0px; background:url(../images/box-content-bg.jpg) left top repeat-x #090A0A; border:2px solid #090B0B; border-top:none;} .site-news-content h3 { margin:0px; padding:6px 10px 4px 25px; text-align:left; font:bold 11px/18px Arial, Helvetica, sans-serif; color:#fff; } .site-news-content p { margin:0px; padding:6px 10px 5px 25px; text-align:left; font:normal 11px/13px Arial, Helvetica, sans-serif; color:#fff; } .content-bottom-box { width:214px; height:28px; float:left; margin:0px; padding:2px 2px 0px 4px; } .content-bottom-box h2 { width:204px; height:23px; float:left; margin:0px; padding:8px 0 0 10px; background:url(../images/content-box-head-bg.jpg) left top no-repeat; } *html .content-bottom-box h2 { height:31px; width:214px;} .content-bottom-box-content { width:212px; height:249px; float:left; margin:0px; padding:0px; background:url(../images/box-content-bg.jpg) left top repeat-x #090A0A; border:2px solid #090B0B; border-top:none;} *html .content-bottom-box-content { width:216px; height:249px; float:left; margin:0px; padding:0px; background:url(../images/box-content-bg.jpg) left top repeat-x #090A0A; border:2px solid #090B0B; border-top:none;} .content-bottom-box-content h3 { margin:0px; padding:6px 10px 4px 15px; text-align:left; font:bold 11px/18px Arial, Helvetica, sans-serif; color:#fff; } .content-bottom-box-content p { margin:0px; padding:4px 10px 3px 15px; text-align:justify; font:normal 11px/12px Arial, Helvetica, sans-serif; color:#fff; } .content-bottom-box-content img { margin:0 0 0 25px; padding:0px;} #right-box { width:161px; height:629px; float:right; margin:0px; padding:2px;} .events { width:156px; height:253px; float:left; margin:5px 0 0 0; padding:0px; background:#2D3542;} .events h3 { width:156px; height:24px; float:left; margin:0px; padding:3px 0 0 5px; background:url(../images/box-sm-head-bg.jpg) left top no-repeat;} .events-content { width:152px; height:221px; float:left; margin:0px; padding:5px 0 0 0; border:2px solid #090B0B; border-top:none; } *html .events-content { width:156px; height:226px; float:left; margin:0px; padding:10px 0 0 0; border:2px solid #090B0B; border-top:none; } .events-content p { margin:3px 0 0 0; height:45px; padding:0px; } .events-content p span { width:146px; float:left; margin:0px; padding:0px 0 0 5px; text-align:left; font:normal 10px/13px Arial, Helvetica, sans-serif; color:#fff; } .events-content p span b { width:50px; float:left; margin:0px; padding:0px; text-align:left; font:normal 10px/13px Arial, Helvetica, sans-serif; color:#fff; } .events-content p span a { width:130px; float:left; margin:0px; padding:0px; text-align:right; font:normal 10px/13px Arial, Helvetica, sans-serif; color:#c00; text-decoration:none; } .forum { width:156px; height:161px; float:left; margin:15px 0 0 0; padding:0px; background:#2D3542;} .forum h3 { width:156px; height:20px; float:left; margin:0px; padding:7px 0 0 5px; background:url(../images/box-sm-head-bg.jpg) left top no-repeat;} *html .forum h3 { width:156px; height:27px; float:left; margin:0px; padding:7px 0 0 5px; background:url(../images/box-sm-head-bg.jpg) left top no-repeat;} .forum-content { width:152px; height:134px; float:left; margin:0px; padding:0px; border:2px solid #090B0B; border-top:none; } *html .forum-content { width:156px; height:134px; float:left; margin:0px; padding:0px; border:2px solid #090B0B; border-top:none; } .shop { width:155px; height:157px; float:left; margin:14px 0 0 0; padding:0px; background:#2D3542;} .shop h3 { width:155px; height:27px; float:left; margin:0px; padding:0px; background:url(../images/head-shopzone.jpg) left top no-repeat;} .shop-content { width:151px; height:130px; float:left; margin:0px; padding:0px; border:2px solid #090B0B; border-top:none; } *html .shop-content { width:155px; height:130px; float:left; margin:0px; padding:0px; border:2px solid #090B0B; border-top:none; } .shop-content img { text-align:center; margin:0 0 0 20px; padding:0px;} .clear { margin:0px; padding:0px; clear:both; height:0px;} http://kansasoutlawwrestling.com/KOW/index.html# Hey folks, having a bit of trouble with a css-based drop down menu in IE7. It works fine in IE8/FF/Chrome etc., but not 7. The problem is when the rollover pops out, if you try and navigate down through the dropdown, it disappears. The issue can be seen here. Here's the code: Code: #mainMenu { width:225px; } * + html #mainMenu { margin-top:0; } #mainMenu li { font-size:12px; text-align:right; margin-left:5px; position:relative; } * html #mainMenu li { margin-left:10px; } #mainMenu li a, #mainMenu li#clock { background:none transparent; display:block; width:221px; height:28px; padding:8px 5px 0 0; border-bottom:1px solid #e1dbcb; color:#eee; } #mainMenu li#clock { text-align:center; padding-left:5px; width:216px; font:small-caps bold 12px Georgia, "Times New Roman", Times, serif; color:#e1dbcb; } #mainMenu li a:hover { background:#e1dbcb; color:#21729d; } li ul { position: absolute; left: 225px; top: -1px; display: none; border:solid #e1dbcb; border-width:1px 5px 1px 0; z-index:200; } * html li ul { left:220px; } #mainMenu li li { background:#21729d; } li ul li a { display: block; text-decoration: none; } li:hover ul, li.over ul { display: block; } Thanks! http:// idatedsatan . net / ewzine / index.html I've posted this before and the last time I was using a really bad workaround to get this drop down to work in IE. Now I'm using the suckerfish method, and it seems to work fine in firefox, opera, ie7, but in ie6 the drop down is offset and I think it's due to the container being offset. I'm not sure how I can make this work in ie6. Also there is supposed to be a background in the dropdown, but that's not showing up in ie6 either. Please help me if you can, much appreciated. I know it's possible, Anyone know how to do it or point me to a good learning tutorial? I have created a style sheet drop down menu and it works fine in mozilla and most times in works in ie however sometimes the menu will not drop down in ie but when you hit refresh the menu drops down. any ideas. Below is my stylesheet for creating a css drop down menu - I am using csshover.htc for internet explorer and this in the html <!--[if IE]> <style type="text/css" media="screen"> body { behavior: url(<%lcURLTheme2%><%lcThemeName%>css/csshover.htc);} #menu ul li {float: left; width: 100%;} #menu ul li a {height: 1%;} </style> <![endif]--> #menu { z-index: 2000; background: url(../images/hoz_menu_BG.gif) repeat-x #8898BC; background-color: #8898BC; color: black; position: absolute; width: 100%; text-align: center; left: 0; cursor: pointer; font-size: .9em; font-weight: bold; font-family: Arial, Helvetica, sans-serif; border-bottom: 5px solid #CCD6EB; } /*top level for student*/ #menu #st ul { list-style: none; margin: 0; padding: 0; width: 19.7%; float: left; } /*2nd level for student*/ #menu #st ul ul { width: 80%; position: absolute; left: 0; z-index: 500; } /*3rd level for student*/ #menu #st ul ul ul { width: 90%; position: absolute; left: 100%; top: 1px; } #menu a { color: #FFFFFF; background-color: transparent; text-decoration: none; text-align: center; display: block; padding: 4px 2px 4px 5px; } #menu a:link { color: #FFFFFF; background-color: #4D678C; } #menu a:visited { color: #FFFFFF; background-color: #4D678C; } #menu a:hover { color: #000000; background-color: #ABBAD7; } #menu ul { border-right: 1px dotted #FFFFFF; } #menu li { position: relative; } #menu ul ul li {border-bottom: 1px solid #FFFFFF; } #menu ul ul { border-right: 1px solid #FFFFFF; } #menu ul ul { border-top: 1px solid #FFFFFF; } /*#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; } /*2nd menu colours - uses #menu styles and then overwrites them for top menu links*/ div#menu ul li li a { color: white; background-color: #4D678C; text-transform: capitalize; text-align: left; border-left: 1px solid #FFFFFF; } For my horizontal drop-down menu, the menu items that overlap the content disappear for some reason in IE7. Here is the link... sweetless.zxq.net I am an absolute newbie to CSS, so I'm not sure if I am missing something really simple? -S I am looking for help with creating a CSS drop down menu. I found an example online, but I am unable to make it work for my site. I am trying make a horizontal drop down menu, but the menu is being displayed vertically, can someone please help. Thanks Below are my codes: Code: CSS /********************** Header ***************************/ #header { margin: 0px 0px 0px 0px; background-image:url(images/header.jpg); width:717px; height:288px; position:relative; } #header-container { position: absolute; top: 1em; left: 1em; } #header ul{ background-color:#000000; width:711px; border: 3px solid #FFFFFF; display:block; top:255px; position:absolute; margin: 0px 0px 0px 0px; height:22px; padding:5px 0px 0px 0px; text-align:center; } #header a { text-align: center; display:block; border: 1px solid #555; white-space:nowrap; margin:0; padding: 0.3em; } #header a:link, #header a:visited, #header a:active /* menu at rest */ { color: white; background-color: #000000; text-decoration:none; } #header a:hover /* menu on mouse-over */ { color: #000000; background-color: #CCCCCC; text-decoration:none; } #header a.top_parent, #header a.top_parent:hover /* attaches down-arrow to all top-parents */ { background-image: url(navdown_white.gif); background-position: right center; background-repeat: no-repeat; } #header a.parent, #header a.parent:hover /* attaches side-arrow to all parents */ { background-image: url(nav_white.gif); background-position: right center; background-repeat: no-repeat; } #header ul { list-style:none; margin:0; padding:0; float:left; width:9em; /* width of all menu boxes */ /* NOTE: For adjustable menu boxes you can comment out the above width rule. However, you will have to add padding in the "#menh a" rule so that the menu boxes will have space on either side of the text -- try it */ } #header li { position:relative; min-height: 1px; /* Sophie Dennis contribution for IE7 */ vertical-align: bottom; /* Sophie Dennis contribution for IE7 */ } #header ul ul { position:absolute; z-index:500; top:auto; display:none; padding: 1em; margin:-1em 0 0 -1em; } #header ul ul ul { top:0; left:100%; } div#header li:hover { cursor:pointer; z-index:100; } div#header li:hover ul ul, div#header li li:hover ul ul, div#header li li li:hover ul ul, div#header li li li li:hover ul ul {display:none;} div#header li:hover ul, div#header li li:hover ul, div#header li li li:hover ul, div#header li li li li:hover ul {display:block;} Code: HTML <div id="container"> <div id="header"> <ul> <li><a href="index.html">Home</a></li> <li><a href="fbstats.html">Football</a></li> <li><a href="bbstats.html">Baseball</a></li> <li><a href="bio.html">Biography</a></li> <li><a href="televison.html">Television</a></li> <li><a href="cdbuy.html">CD/Book</a></li> <li><a href="video.html">Videos</a></li> </ul> </div> Hi there, Any help would be appreciated. Im currently building a site http://lafine.101webtech.com Im implementing the drop down menu system from CSSPlay for some reason its all good in IE7, Firefox, Safari (PC) but IE6 is not display the top level items as a horizontal list. I know the menu works in IE6 as I tested on the site before I grabbed the code. It must be something in my implementation but I can't for the life of me work out what. Cheers, Phil |