Question

I've been working om this drop down menu thing for a while now and decided I'm not able to do it by myself. I've googled many solutions and seen a couple of youtube tutorials for css drop down menus but somehow they always work for the person in question but not for me. Hopefully you can help me.

Previous problems with other code were thins like text pushing down or other stuff shifting out of place. This is the last video i've tried: http://www.youtube.com/watch?v=_mdjwPzzKT8 The problem with this one is that my sub menu is not showing up at all anymore. This is where I stopped and decided I need help.

Hopefully you can help with my code!

The css code I have now:

#topnav         { z-index:3;
                    padding-top:76px; }

#topnav ul li       { list-style-type:none; 
                    display:inline;
                    float:right;
                    }


#topnav ul li a     { font-family:Arial, Helvetica, sans-serif;
                        font-size:13px;
                        font-weight:bold;
                        text-decoration:none;
                        padding-left:15px;
                        }

#topnav ul li a:link        { color:#00aeef; }
#topnav ul li a:visited     { color:#00aeef; }
#topnav ul li a:active      { color:#f26532; }
#topnav ul li a:hover       { color:#f26532; }
#topnav ul li a:focus       { color:#f26532; }

#topnav li ul           { position:absolute;
                                left:-999em;
                                list-style-type:none;
                                }

#topnav li ul li            { border-top:0px;
                                clear:both;}

#topnav li:hoover ul        { left:auto; }

The html code I hav now:

<div id="topnav">
                <ul>
                    <li><a href="contact.html">CONTACT</a></li>
                    <li><a href="blog.html">BLOG</a></li>
                    <li><a href="over ons.html">OVER ONS</a></li>
                    <li><a href="gedragsbeinvloeding.html">GEDRAGSBEINVLOEDING</a></li>
                    <li><a href="onze diensten.html">ONZE DIENSTEN</a>
                        <ul>
                            <li><a href="onderzoek.html">ONDERZOEK</a></li>
                            <li><a href="advies.html">ADVIES</a></li>
                            <li><a href="lezingen.html">LEZINGEN</a></li>
                        </ul>                       
                    </li>
                    <li><a href="index.html">HOME</a></li>
                </ul>
            </div>
Was it helpful?

Solution

You have li:hoover. This should be li:hover

http://jsfiddle.net/68ZkK/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top