HTML CSS examples for CSS Widget:Hover Link
Make link hover background fill the entire background
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> body {<!--from www.j av a 2 s . c om--> padding:0; margin:0; } p, ul { font-family:"Roboto", sans-serif; text-align:center; } .header { font-family:"Roboto"; margin:0; padding:0; } a:link, a:visited { color:Chartreuse; background-color:yellow; text-decoration:none; } .header ul { list-style:none; text-align:center; background-color:blue; padding:0; margin:0; } .header li { border-bottom:2px solid pink; font-size:21px; padding:0; } ul h3 { margin:0; padding:0 } .header a { display:block; padding:31px; } .header a:hover { background-color:OrangeRed; } </style> </head> <body> <header> <div class="header"> <ul> <li> <h3> <a href="./">Lore</a> </h3> </li> <li> <h3> <a href="./about.html">Lorem ip</a> </h3> </li> </ul> </div> </header> </body> </html>