HTML CSS examples for CSS Widget:Menu Hover
Make horizontal menu with UL and :hover
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .main-nav {<!-- w w w . j a va 2 s . c o m--> color:Chartreuse; width:100%; background-color:yellow; float:right; line-height:43px; margin-top:-4px; } .main-nav ul li { display:inline; padding:0px 11px; } .main-nav ul li a { color:blue; text-decoration:none; padding:21px 15px; } .main-nav ul { margin-bottom:8px !important; } .main-nav ul li a:hover { background-color:pink; } body .main-nav ul li a:active { background-color:WhiteSmoke; } </style> </head> <body> <nav class="main-nav"> <ul> <li> <a href="one.php"> Home </a> </li> <li> <a href="transaction.php"> Trade Now</a> </li> <li> <a href="view.php"> Transactions </a> </li> <li> <a href="chart.php"> Performance </a> </li> <li> <a href="complete.php">History </a> </li> <li class="time"> test test test test <span id="hm_timer" class="style colorDefinition size_sm">08:05:35</span> hours </li> </ul> </nav> </body> </html>