a53-416
a53-416

Reputation: 3935

How do I properly implement a drop down menu with just CSS?

I'm struggling with an issue with my drop-down menu, which is that the dropdown menu is displayed properly, but disappears once it stretches below the containing div. Here's an illustration of what i'm talking about:

dropdown menu

The menu only extends to the height of the black containing <div>. Here's my framework:

<ul>
     <li><a href=''>Menu Item</a></li>
     <li><a href=''>Menu Item 2</a>
     <ul class="sub_menu">
          <li><a href=''>...</a></li>
          <li><a href=''>...</a></li>
          <li><a href=''>...</a></li>
     </ul>
</ul>

Upvotes: 0

Views: 74

Answers (2)

mas-designs
mas-designs

Reputation: 7536

Did you try to specify the width and height properties for your ul, and li elements yet ?

Upvotes: 0

Aaron
Aaron

Reputation: 5227

Try giving your containing element an overflow property of visible.

Upvotes: 4

Related Questions