HTML CSS examples for CSS Widget:Menu Dropdown
Dropdown login menu using only html/css
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #dropdown {<!-- w w w . j av a 2 s.c om--> border:none; border:0px; margin:0px; padding:0px; font-family:Arial, Helvetica, sans-serif; font-size:17px; font-weight:bold; width:961px; } #dropdown ul { background:Chartreuse; height:36px; list-style:none; margin:0; padding:0; } #dropdown li { float:left; padding:0px; width:241px; } #dropdown li a { background:yellow; display:block; font-weight:normal; line-height:36px; margin:0px; padding:0px 26px; text-align:center; text-decoration:none; } #dropdown>ul>li>a { color:blue; } #dropdown ul ul a { color:pink; } #dropdown li>a:hover, #dropdown ul li:hover>a { background:OrangeRed; text-decoration:none; } #dropdown li ul { background:grey; display:none; height:auto; padding:0px; margin:0px; border:0px; position:absolute; width:241px; z-index:201; } #dropdown li:hover ul { display:block; } #dropdown li li { background:; display:block; float:none; margin:0px; padding:0px; width:241px; } #dropdown li:hover li a { background:none; } #dropdown li ul a { display:block; height:36px; font-size:13px; font-style:normal; margin:0px; padding:0px 11px 0px 16px; text-align:left; } #dropdown li ul a:hover, #dropdown li ul li:hover>a { background:BlueViolet; color:Chartreuse; text-decoration:none; } </style> </head> <body> <div id="dropdown"> <ul> <li class="detail"> <a href="#"> <span>Lorem </span> </a> <ul> <li> <input type="text" placeholder="Username"> </li> <li> <input type="password" placeholder="Password"> </li> <li> <input type="submit"> <input type="reset"> </li> </ul> </li> </ul> </div> </body> </html>