I would like to remove the :hover color from the text. However, knowing what the non-hover color is not possible in this case. Is there a way to set the color to inherit from its non :hover parent self? I can see and modify the element:hover CSS but not the element CSS.
Clarification: I want the link to inherit the color from its non-hovered state so that hovering does not have an effect on the element's color. I encapsulated a div in a link so that the entire div would be a link, but I don't want that to change the text's color inside the div. I am changing the background color instead.
You cannot. There is no undo in CSS. That is, if some style sheet assigns a property to an element, or to a state of an element, there is no way to tell a browser behave as if that rule were not there. You can override its effect, but this means setting the property to a value (which could be inherit
, but that won’t help here, since inheritance is from a parent).
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