Edit: I know using browser-specific CSS is highly discouraged but this is to answer the question - in case someone else needs this, and specifically this.
Without using JavaScript, I know you can target Internet Explorer and Firefox (Chrome-only seems plausable) but I have my doubts about the Safari method.
Internet Explorer: (https://css-tricks.com/how-to-create-an-ie-only-stylesheet/)
HTML (yes, it's meant to be commented out):
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="all-ie-only.css" />
<![endif]-->
Google Chrome (and Safari or other Webkit)
I forgot to get the URL... sorry
/* Chrome, Safari, AND NOW ALSO the Edge Browser and Firefox */
@media and (-webkit-min-device-pixel-ratio:0) {
/* CSS CODE */
}
/* Chrome 29+ */
@media screen and (-webkit-min-device-pixel-ratio:0)
and (min-resolution:.001dpcm) {
/* CSS CODE */
}
/* Chrome 22-28 */
@media screen and(-webkit-min-device-pixel-ratio:0) {
.selector {-chrome-:only(;
/* CSS CODE */
);}
}
Safari Only - Questionable
This one apparently works with Safari 9.0+ but I'm not that sure about this one. https://stackoverflow.com/a/23948854/2872279
.yourClass:not(:root:root){
/* ^_^ */
}
Mozilla Firefox
Targeting only Firefox with CSS
@-moz-document url-prefix() {
/* CSS Code */
}
If you are using JavaScript, I'd recommend just using this tool (I didn't look into it that much but I believe it uses the User Agent):
http://rafael.adm.br/css_browser_selector/
Otherwise, you could just use PHP or some other language and get it by user agent.
Another Edit: I've just noticed that someone has also posted a nice hacks list for CSS - so I'll refer you to their answer: https://stackoverflow.com/a/4332138/2872279