css - Why - cursor: pointer style being overridden for input in chrome and firefox -
i'm trying set cursor: pointer on dom element, input isn't taking it. in chrome, see "user agent stylesheet" overriding css. wtf?
<!doctype html> <body> <div class='a'> <input type='checkbox'> </div> <style> .a { cursor: pointer; } </style> </body>
i have seen question: why user agent stylesheet override styles? problem not seem doctype, the recommended doctype.
using !important
isn't acceptable here, shouldn't have worry weird browser useragent styles. what's going on?
update: clarify, question why user agent stylesheet overriding css , how create that stop. question not how can hack around behavior. right behavior of css cursor style should inherited kid nodes.
you need add together cursor:pointer input tag instead of surrounding div.
input { cursor: inherit; }
the user agent stylesheet overriding input, not parent.
css google-chrome firefox
No comments:
Post a Comment