HTML CSS examples for CSS Widget:Hover to change
Change height-top of item when hover
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #menu ul { margin:0px; padding:0px; list-style-type:none; } #menu a { float:left; } #menu a { display:block; width:9em; color:Chartreuse; background-color:yellow; text-decoration:none;<!--from w ww. j a v a 2s. co m--> text-align:center; } #menu a:hover { padding-top:11px; margin-top:-11px; background-color:blue; } </style> </head> <body> <div id="menu"> <ul> <li> <a href="#">Lor</a> </li> <li> <a href="#">Lore</a> </li> <li> <a href="#">Lorem</a> </li> </ul> </div> </body> </html>