CSS hack for Google Chrome and Safari

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;
    }
}

Print | posted @ Tuesday, September 4, 2012 1:54 PM

Comments on this entry:

Gravatar # re: CSS hack for Google Chrome and Safari
by Raghibsuleman at 1/4/2013 1:11 AM

Thanks for this post...
Gravatar # re: CSS hack for Google Chrome and Safari
by Alessandro at 1/19/2013 7:12 PM

Brilliant thank you.. had been searching for the CSS hack for Google Chrome. Thank you. You really made life easy
Gravatar # re: CSS hack for Google Chrome and Safari
by Michael at 3/21/2013 6:06 AM

Where do you put this code. In the external style.css file or??

I did this. And nothing happened.

Hope you can help me.
Post A Comment
Title:
Name:
Email:
Comment:
Verification:
 
 
Twitter