HTML CSS examples for CSS Widget:Menu Dropdown
Dropdown menu item
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #navbar {<!--from w w w .jav a 2 s. co m--> width:1211px; height:36px; background-color:Chartreuse; position:fixed; left:51%; margin-left:-606px; top:0px; z-index:1002; } #navbar>ul { list-style:none; text-align:left; padding-left:26px; margin-top:0px; } #navbar>ul>li { float:left; margin-left:22px; font-family:'Open Sans', sans-serif; font-size:15px; text-transform:uppercase; color:yellow; border-top:3px solid blue; padding-top:9px; } #navbar>ul>li:first-child { margin-left:0px; } #navbar>ul>li.navbar_multiple { margin-left:14px; } #navbar>ul>li:hover { border-top:3px solid pink; cursor:pointer; } #navbar>ul>li>ul { list-style:none; position:relative; margin-left:0px; padding-left:0px; } #navbar>ul>li>ul>li { padding-left:0px; display:none; text-transform:none; font-size:13px; padding:5px 5px 9px 7px; padding-top:11px; border-top:2px solid OrangeRed; background-color:grey; } #navbar>ul>li>ul>li:last-child { border-bottom:4px solid BlueViolet; } #navbar>ul>li.navbar_multiple:hover>ul>li { display:block; height:21px; padding-left:11px; margin-left:0px; } #navbar>ul>li.navbar_multiple>ul>li:hover { background-color:Chartreuse; } #navbar>ul>li.navbar_multiple:hover { background-color:yellow; padding-right:0px !important; } </style> </head> <body> <div id="navbar"> <ul> <li>Lore</li> <li>Lore</li> <li>Lore</li> <li>Lore</li> <li>Lorem </li> <li class="navbar_multiple">Lorem ipsum <ul> <li>Lorem </li> <li>Lorem ipsum d</li> <li>Lor</li> </ul> </li> <li>Lor</li> </ul> </div> </body> </html>