CSS hack for Google Chrome and Safari

Posted by Renso on Geeks with Blogs See other posts from Geeks with Blogs or by Renso
Published on Tue, 04 Sep 2012 11:54:41 GMT Indexed on 2012/09/07 21:39 UTC
Read the original article Hit count: 152

Filed under:
When wanting to hack css in an external stylesheet just for Google Chrome and Safari. Here is an example of where I override the margin-top for Chrome and Safari.

Normal:

#AccountMaintenanceWrapper #callDetailsPreviewWrapper
{
    border: none;
    padding: 0px;
    width: 209px;
    position: fixed;
    margin-top: 84px;
    z-index: 1;
}


Google Chrome and Safari:
@media screen and (-webkit-min-device-pixel-ratio:0)
{

    #AccountMaintenanceWrapper #callDetailsPreviewWrapper
    {
        margin-top: 12px;
    }
}

© Geeks with Blogs or respective owner