Ali Nouman
Ali Nouman

Reputation: 3414

#nav-bar li:hover ul not working?

My following css selector #nav-bar li:hover ul should show the

  <li><a href="#">Marketing</a></li>
  <li><a href="#">Advertising</a></li>
  <li><a href="#">Media</a></li>

but its not showing here is the fiddle

http://jsfiddle.net/g9Rrn/1/

Upvotes: 0

Views: 1080

Answers (1)

U-DON
U-DON

Reputation: 2140

What you had:

<li><a href="#">Contact</a></li>
<li>
  <ul>
  <li><a href="#">Marketing</a></li>
  <li><a href="#">Advertising</a></li>
  <li><a href="#">Media</a></li>
   </ul>
  </li>

You already closed off the list element containing "Contact" before you contained the sub-list within it. What it should be:

<li>
  <a href="#">Contact</a>
  <ul>
    <li><a href="#">Marketing</a></li>
    <li><a href="#">Advertising</a></li>
    <li><a href="#">Media</a></li>
  </ul>
</li>

Upvotes: 5

Related Questions