Separate files for each browser and their connection through JavaScript
I would make a separate css-file for each browser, then use JavaScript to determine the client’s browser , then use JavaScript to connect the corresponding file (in essence, we create the link tag).
If there are not so many rules, you can use JavaScript to create a style tag and its content (after determining the client’s browser).
Clean CSS: Conditional Browser Styles (Hacks)
If you do not want to get involved with JavaScript, there is an interesting solution within the CSS in English SO .
The essence of it is that you specify styles for each browser individually through vendor prefixes, @media or @supports :
By .selector meant the selector you need.
/* Chrome 28+ */ @supports (-webkit-appearance:none) { /* Нужные стили */ } /* Firefox (любой) */ _:-moz-tree-row(hover), .selector { /* Нужные стили */ } /* Internet Explorer 11+ */ _:-ms-fullscreen, :root .selector { /* Нужные стили */ } /* Internet Explorer 10+ */ _:-ms-lang(x), .selector { /* Нужные стили */ } /* Также Internet Explorer 10+ */ @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { /* Нужные стили */ } /* Internet Explorer 9+ */ _::selection, .selector { /* Нужные стили */ } /* Safari 6.1+, Chrome для iOS */ @media screen and (min-color-index: 0) and(-webkit-min-device-pixel-ratio: 0) { @media { /* Нужные стили */ }}
IEon@media screen and (min-width:0\0)- will it be better? It is very desirable to somehow replace*for chrome - CodeGust