nworst Posted August 13, 2009 Share Posted August 13, 2009 I want the links in my menu to get a different color (a:hover {background-color:...}), but I want the rest of the links to stay normal. So how do I set the a:hover only for the <div class="menu">?Thanks Link to comment Share on other sites More sharing options...
dsonesuk Posted August 13, 2009 Share Posted August 13, 2009 this is one simple menu option:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Untitled Document</title><style type="text/css">.menu {overflow: hidden;}.menu a {display:block; float:left; padding: 0 8px; height: 26px; line-height: 26px; background-color:#0000CC; text-decoration: none; color: #fff;}.menu a:hover {background-color:#0066FF;}</style></head><body><div class="menu"><a href="#">Menu Link1</a><a href="#">Menu Link2</a><a href="#">Menu Link3</a></div></body></html> Link to comment Share on other sites More sharing options...
nworst Posted August 13, 2009 Author Share Posted August 13, 2009 Thanks! Worked out as I had in mind Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.