HTML CSS examples for CSS Widget:Menu Hover
Using hover to create menu using CSS only
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .menu {<!--from ww w . j a v a 2 s .c om--> list-style:none; } .menu li { position:relative; } .menu li:hover .drop-down { left:0px; position:relative; } .drop-down { left:-10000px; position:absolute; } </style> </head> <body> <ul class="menu"> <li> Menu 1 <ul class="drop-down"> <li>One</li> <li>Two</li> <li>Three</li> </ul> </li> <li> Menu 2 <ul class="drop-down"> <li>One</li> <li>Two</li> <li>Three</li> </ul> </li> </ul> </body> </html>