HTML CSS examples for CSS Widget:Menu Hover
Header content with menu and highlight with hover
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #header {<!--from w ww .ja v a 2 s . c o m--> font-size: 100%; height:8%; color: red; background: #323B50; width: 100%; -moz-box-shadow: 1px 2px 3px rgba(0, 0, 0, .5); -webkit-box-shadow: 1px 2px 3px rgba(0, 0, 0, .5); box-shadow: 1px 2px 3px rgba(0, 0, 0, .5); border-radius: 1px; top: 0; z-index: 100; left:0%; text-align:center; } #nav { background:pink; color:#000000; opacity:1; -moz-box-shadow: 1px 2px 3px rgba(0, 0, 0, .5); -webkit-box-shadow: 1px 2px 3px rgba(0, 0, 0, .5); box-shadow: 1px 2px 3px rgba(0, 0, 0, .5); font-family:'Ubuntu'; border-radius: 1px; top: 8%; width: 100%; z-index: 100; left: 0%; height: 3.5%; padding: 0%; font-size: 75%; } ul { list-style-type:none; margin:0; padding:0; overflow:hidden; } li { float:left; width: 25%; } a:link, a:visited { display:block; width:100%; color:#404040; text-align:center; padding:4px; text-decoration:none; text-transform:uppercase; } a:hover, a:active { background-color: #323B50; color: #FFFFFF; -webkit-transition: all 500ms ease; -moz-transition: all 500ms ease; -ms-transition: all 500ms ease; -o-transition: all 500ms ease; transition: all 500ms ease; border-radius: 1px; } #footer { position:absolute; width: 100%; top:216%; left: 0; height:3%; color: #FFFFFF; background: #323B50; width: 100% } </style> </head> <body> <div id="header"> <h1>Home</h1> </div> <div id="nav"> <ul> <li> <a href="#home">Home</a> </li> <li> <a href="#news">News</a> </li> <li> <a href="#contact">Contact</a> </li> <li> <a href="#about">About</a> </li> </ul> </div> <div id="footer">footer</div> </body> </html>