Alexancho Posted September 19, 2010 Share Posted September 19, 2010 I need a one div to be in Chrome only, so i used a code: div.chrome_hack{display:none;}@media screen and (-webkit-min-device-pixel-ratio:0){div.chrome_hack{display:block;}} It works, but causes a validation error: 110 Property -webkit-min-device-pixel-ratio doesn't exist for media screen : 0 0Is there a better solution? And if there isn't can we say this solution is correct? Link to comment Share on other sites More sharing options...
jeffman Posted September 19, 2010 Share Posted September 19, 2010 All browser-specific CSS causes a validation error. Those are the ones that start with -webkit, -moz, etc. If the hack works and you can live with the "error," don't worry about it. Validation is supposed to be a tool, not a blue ribbon. Link to comment Share on other sites More sharing options...
Alexancho Posted September 19, 2010 Author Share Posted September 19, 2010 Thank you very much! Link to comment Share on other sites More sharing options...
[dx] Posted September 19, 2010 Share Posted September 19, 2010 I have a good js script which works with browsers, so if you need just for chrome, you type .chrome div.chrome_hack { parameters here;} It's usefull tool.Check http://rafael.adm.br/css_browser_selector Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.