...

View Full Version : drop down css help



jblevins1991
06-02-2012, 05:01 PM
here is my html code

<body>

<ul>
<li>1</li>
<li>2</li>

<ul>
<li>a</li>
<li>b</li>
<li>c</li>
</ul>

<li>3</li>
</ul>

</body>

the problem i am having is getting the drop down list items to disappear and then reappear when you hover over the second list item.

i have tried

.nav li ul li
{
position: relative;
left: -9999px;

}

but it doesn't disappear. i have also tried display: hidden and a lot of other things. this is in html 5.

abduraooft
06-02-2012, 05:13 PM
here is my html code
Please post your complete code (HTML+CSS) so that we may reproduce the error at our end and then try to find a solution.

COBOLdinosaur
06-02-2012, 06:15 PM
display: hidden

Should be either
display:none;
or
visibility:hidden;

Apply it directly to the target element, and once it works then start with the nested and get lost nonsense.

Excavator
06-03-2012, 03:51 PM
Hello jblevins1991,
If abc is meant to be a dropped menu from 2 then your ul is not formed correctly. It should be more like this -

<ul>
<li>1</li>
<li>2
<ul>
<li>a</li>
<li>b</li>
<li>c</li>
</ul>
</li>
<li>3</li>
</ul>

Your code, .nav li ul li, isn't working because you have no ul nested in an li.

Have a look at how simple a drop down menu (http://nopeople.com/CSS%20tips/CSS_dropDownMenu-noImages/index.html) can be.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum