CSS Hacks Google Chrome (works with FF 3.5)
Sep26Difficulty: 




Life is a bitch when you are a webdesigner. – With so much (new) browsers (Internet Explorer 6,7, Firefox 2,3, Opera 9, Chrome etc), your webdesign looks completely different in every browser, while browser compatibility is a very important point.
Luckily there are some hacks to exclude some browsers. In this post I target Google Chrome only:
These hacks don’t validate, but are 100% safe according to CSS parsing rules.
/* chrome browser */
body:nth-of-type(1) #hackme{ styles for chrome here }
Update Oct 2009: Since the release of Firefox 3.5 the above hack is not targeted by Chrome only anymore. Therefore use the following hack below:
@media screen and (-webkit-min-device-pixel-ratio:0){
#hackme { styles for chrome here }
}
Posted in css |chrome hack, / chrome only, / css, / ff 3.5, / firefox update
» 7 Comments, post your comment now. »
7 Responses to “CSS Hacks Google Chrome (works with FF 3.5)”
Thanks for this. It should be noted that this hack works for Google Chrome 2.x whereas a different hack that worked for Chrome 1.x didn’t work with 2.x
Please note, this css hack, won’t differnentiates with the newest FF 3.5.
A new Chrome only hack should be used.
Thanks, it works
This hack won’t affect only Chrome but also Safari!
ohhhhhhh thanks u so much.
it’s work.
You rock! Thanks!