SUPPORT THE SITE WITH A CLICK

Subscribe Rss:

SUPPORT THE SITE WITH A CLICK

Sunday, April 10, 2011

Css Hacks for google chrome

CSS hacks take advantage of browser bugs for hiding CssRules from specific web browsers.Dealing with browser inconsistencies often makes up a majority of the work for a web developers.As lots of new versions arise day by day, the style issues seems to be hectic.

Google Chrome browser hacks


1.Use body:nth-of-type(1) .elementOrClassName{property:value;} only for google chrome.

Ex: body:nth-of-type(1) .chrome{border:1px solid red}

2.Use Webkit (A layout engine to allow web browsers to render pages)

@media screen and (-webkit-min-device-pixel-ratio:0) {
.elementOrClassName{property:value;}
}






Yep, the styles we have made have applied to chrome browser & not to firefox

4 comments :

  1. But why didn't it work when I added a background color to "myId"?

    ReplyDelete
  2. It's not just for Chrome, work on Safari :(

    ReplyDelete
  3. Gracias!, me salvó la vida!

    ReplyDelete