CSS check for Chrome, IE, Firefox

Posted by hankh on Stack Overflow See other posts from Stack Overflow or by hankh
Published on 2010-05-17T02:31:02Z Indexed on 2010/05/17 2:40 UTC
Read the original article Hit count: 197

Filed under:
|
|

I've noticed a small alignment issue in the three major browsers when rendering my web site. As such how can I perform the following pseudo-code with pure CSS?

if Webkit (Safari/Chrome) {
    #myDIV {margin-top:-3px}
} else if (Firefox) {
    #myDIV {margin-top:0px}
} else { // IE and other browsers
    #myDIV {margin-top:1px}
}

© Stack Overflow or respective owner

Related posts about css

Related posts about web-development