Geeks With Blogs

News
Renso Hollhumer
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;
    }
}
Posted on Tuesday, September 4, 2012 1:54 PM CSS | Back to top


Comments on this post: CSS hack for Google Chrome and Safari

# re: CSS hack for Google Chrome and Safari
Requesting Gravatar...
Thanks for this post...
Left by Raghibsuleman on Jan 04, 2013 1:11 AM

# re: CSS hack for Google Chrome and Safari
Requesting Gravatar...
Brilliant thank you.. had been searching for the CSS hack for Google Chrome. Thank you. You really made life easy
Left by Alessandro on Jan 19, 2013 7:12 PM

# re: CSS hack for Google Chrome and Safari
Requesting Gravatar...
Where do you put this code. In the external style.css file or??

I did this. And nothing happened.

Hope you can help me.
Left by Michael on Mar 21, 2013 6:06 AM

Your comment:
 (will show your gravatar)


Copyright © Renso | Powered by: GeeksWithBlogs.net | Join free