I have some problem with CSS styles: Two browsers showed me different styles

214 Views Asked by At

I usually use the Yandex browser, and there is no problem until I tested my web app with Chrome. Chrome and Yandex browsers were showing me 2 different styles. So I want to add styles to only the Chrome browser for fixing style bugs.

I tried to find how to add styles to only the Chrome browser, but I couldn't find any. Then I actually want to add another style for only the Chrome browser.

1

There are 1 best solutions below

0
Robert Bradley On BEST ANSWER

This should work:

@media screen and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: 0.001dpcm) {
    /* Styles for Chrome only here */
}

And this guide page on BrowserStack should be useful if you need more information, or if you need to do it with other browsers as well.