Link hovering
Allen
Registered Users Posts: 10,013 Major grins
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:hover > .lastName {
color: gold !important;
}
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;
}
0