Jess McKenzie
Jess McKenzie

Reputation: 8385

CSS Menu CSS Confusion

I have got the following HTML but I am unsure how to code the CSS so that when I hover the main li the drop down menu shows.

        <li><a href="#">#</a>
            <ul class="sub_menu">
                <li><a href="#">#</a></li>
                <li><a href="#">#</a></li>
                <li><a href="#">#</a></li>
                <li><a href="#">#</li></li>
                </ul>
            </li>`

Upvotes: 0

Views: 61

Answers (1)

Jordan
Jordan

Reputation: 32522

li ul {
    display: none;
}

li:hover ul {
    display: block;
}

This won't work in IE6 but nobody cares about that anymore.

Upvotes: 5

Related Questions