html - CSS – link:hover color inheritance issue -
i confused happening here. wondering why link white when cursor within button not directly on link? want red while cursor within button boundaries.
think happening because @ point, page inheriting declared .links:a color value, wondering how override that? .links:hover doesn't seem transfer inheritance .links a:hover (?)
appreciated!!
.links a{ color:white; text-decoration:none; } .links:hover{ background-color:white; color:red; } .links a:hover{ background-color:white; color:red; }
your rules working way wrote them. if want a
text red while hovering on entire div
, need rule that. add this:
.links:hover { color: red; }
if isn't obvious, controls text-color of link while hovering on div.
Comments
Post a Comment