DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Chara has posted 50 posts at DZone. View Full User Profile

Targeting Chrome With CSS

  • submit to reddit
<style type="text/css">
@media screen and (-webkit-min-device-pixel-ratio:0) {
    H5 { color:red; }
    P { margin-left:20px; }
    /* other special styles for Chrome here */
// source:

This solution is based on Chrome specific CSS extension. Other browsers will ignore this rule.