Link hovering

AllenAllen Registered Users Posts: 10,013 Major grins
edited November 8, 2013 in SmugMug Customization
I'm using links like this with the last name is a different color. The hover color changes for both the "a" and .lastname when hovering the .lastname. But I'd like to find a way when hovering the "a" link that the span lastname also changes color.

Anyone have a solution?

<a href="link">FirstName MiddleName <span class="lastName">LastName</span></a>
a {
  color: #fff;
}

.lastName {
  color: yellow;
}

.lastName a :hover, 
.lastName a:hover, 
a :hover, a:hover {
  color: gold;
}
Edit: found it, just need to add the !important.
a:hover > .lastName {
color: gold !important;
}
Al - Just a volunteer here having fun
My Website index | My Blog
Sign In or Register to comment.