HTML CSS examples for CSS Widget:Color
Change anchor color when you hover over a list item
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #nav li{<!--from w w w.j av a 2s .co m--> display: inline; text-align: center; list-style-type:none; background-color:#1A365B; margin: 0 6px 0 0; padding: 2px 20px 4px 20px; -webkit-border-radius: 8px; -moz-border-radius: 8px; border-radius: 8px; } #nav li:hover{ background-color:blue; border: 2px solid #000; color: #000000; padding: 0 18px 2px 18px; } #nav li:hover a{ color: #000000; } #nav li a:hover{ color: #000000; } #nav li a{ text-decoration: none; color: #ffffff; font-weight:bold; text-transform: capitalize; font-size: 12px; } </style> </head> <body> <ul id="nav" class="grid_16"> <li> <a href="#">FORSIDE</a> </li> <li> <a href="#">MOBIL</a> </li> <li> <a href="#">PC OG SERVERE</a> </li> </ul> </body> </html>