I'm trying to override the anchor color and set the color to be what it normally would have been without the link.
a .right {
color:inherit;
}
a:link .right {
color:inherit;
}
<a href="...">
<div class="right">
<div class="text">
Some Text
</div>
</div>
</a>
Neither seem to be working.
Put a class on the anchor itself and then set:
.yourAnchorClass { color: inherit; }
See fiddle example.
Inheritance is from the parent element. So all your solutions are doing is telling the divs to inherit the color of the anchor. By the way, it is actually invalid HTML4 to have a div inside an a tag (a block level element inside an inline element). If you can, it would be best to change those to span and then set display: block on the span elements inside the a.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With