If you want to apply a specific style for a particular browser, one simple method is using JavaScript to detect the browser and then adding the browser's name as a class to the body tag of your webpage. This way, you can easily target that specific browser with CSS.
Here's an example on jsFiddle demonstrating how to detect Chrome.
However, there may be alternative solutions to address your issue without requiring extra scripts or markup.
Make sure to verify the path to your font files. Different browsers have varying levels of strictness when it comes to locating fonts:
@font-face {
font-family: 'your-font-name';
src: url('/fonts/your-font-name.woff2') format('woff2'), /* Double-check the file path */
url('/fonts/your-font-name.woff') format('woff'); /* Double-check the file path */
font-weight: normal; /* If this isn't being applied, consider specifying it in the h1 tag */
font-style: normal;
}
If you've specified "font-weight: normal;" in your @font declaration but it's not taking effect, certain browsers may require an additional rule specifically for the h1 element:
h1 {
font-weight: normal;
}