HTML CSS examples for CSS Widget:Menu
Changing background color on mouse over for menu
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .menu {<!-- ww w.ja va2s . c o m--> height: 100px; float: right; z-index: 100; } .menu li { display: inline; float:left; width:auto; } .menu ul { margin-top: 45px; } .menu a { text-decoration : none; font-size: 15px; color: red; } .menu li a { } .menu a:hover { background-color: #306; } .active , .inactive { width: 800px; padding-left: 30px; padding-right: 30px; padding-top: 50px; padding-bottom: 34px; } .active { background-color: #306; color: #ffffff; } .inactive { color: #ffffff; background-color: #0CF; } </style> </head> <body> <div class="menu"> <ul> <li> <a href="#" class="active">Home</a> </li> <li> <a href="#" class="inactive">About</a> </li> <li> <a href="#" class="inactive">Products</a> </li> <li> <a href="#" class="inactive">Product Support</a> </li> <li> <a href="#" class="inactive">Contact Us</a> </li> <li> <a href="#" class="inactive">FAQ</a> </li> </ul> </div> </body> </html>