HTML CSS examples for CSS Widget:Menu Hover
No Glitch flickering with hovering menu list
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> html,body { height:100%; width:100%; margin:0; padding:0; } #header {<!-- w w w .jav a 2 s . c o m--> position:fixed; top:0; width:100vmax; height:8.6vmax; } #lefthead { background-color:Chartreuse; width:25.76vmax; height:8.6vmax; float:left; } #middlehead { background-color:yellow; width:61.26vmax; height:8.6vmax; margin:0; float:left; } #righthead { background-color:blue; width:16vmax; height:8.6vmax; float:left; } ul { width:100%; margin:0 auto; list-style-type:none; text-align:center; padding-left:0; margin-left:-3.7vmax; } li { display:inline-block; position:relative; line-height:8vmax; vertical-align:middle; } ul li a { color:pink; text-decoration:none; margin-left:6vmax; font-size:2.4vmax; padding:2vmax; } a:hover { background-color:OrangeRed; } </style> </head> <body> <title>Lorem ipsum dolor sit</title> <link href="css/style.css" rel="stylesheet" type="text/css"> <div id="header"> <div id="lefthead"></div> <div id="middlehead"> <ul> <li> <a href="#"> <span>Lore</span> </a> </li> <li> <a href="#">Lorem ipsum d</a> </li> <li> <a href="#">Lorem ipsum dolo</a> </li> <li> <a href="#">Lorem ipsum dolor </a> </li> <li> <a href="#">Lorem i</a> </li> </ul> </div> <div id="righthead"></div> </div> <div id="content"></div> </body> </html>