Adding style to hover only when there is href
Today I needed to find a way to style <a> tags that didn’t have href inside them.
You can do that with CSS3 as follows:
a:hover {background: yellow;}
a:hover:not([href]) {background: none;}
Examples below:
No comments yet.