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; } 

https://jsfiddle.net/3dujymlk/1/

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

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

css - Can I use the :after pseudo-element on an input field? -