css - :hover ignored over margin -
strange hover problem in ie8 & 10, can't find anything... surely, i'm not first stumble upon it?
html: <a href="#"><img style="border:0" src="image.png">text</a> css: {border:1px solid silver} img {margin-right:30px} a:hover {border:1px solid red}
in ie, when hover mouse on image or text, border changes red expected, when move mouse on space caused margin-right
, border returns gray.
in firefox, border stays red wherever mouse on <a>
.
since problem reproducible on jsfiddle, it's not caused bad <doctype>
...
use display:inline-block; on anchor link or use padding-right on image instead of margin , work in ie
Comments
Post a Comment