Skip to content Skip to sidebar Skip to footer

Css Formatting Showing In Ie But Not Chrome Or Firefox

This one is stumping me, as I've searched and searched through similar issue topic threads on this site but none of them are helping me resolve the issue. I have the following HTML

Solution 1:

Presentation (css) can appear different in different web browsers because each web browser has their own default and user configurable settings. You will always see differences between browsers because of differences in the default settings. eg. In the screen shot below using your sample code you can see that on my computer IE and other browsers display the page 'more or less' the same. Canary v IE11

To make browsers display the same web pages 'more or less the same' you need to configure each of them with the same default settings for presentation (fonts, font sizes, color, background colors etc)

To debug rendering differences between browsers you need to use the DOM Explorer tab of the Dev tool in each browser(screen shot above) and compare the applied rules.

To help you further we would really need a screen shot from your computer, showing the browsers side by side. As you can see by the screen shot on my computer different browsers display the page 'more or less the same'. That's because I have configure all of my test browsers with the same user settings for presentation/accessibility (text size, zoom, color, background-color, font family, link and hover color etc).

The best way to test between browsers is to use https://www.browserstack.com/ because you are using virtual instances of vendors' browsers that have the 'factory' default settings. Comparing browsers on your own computer you should expect that the best result is that they will display the same web page "more or less the same", but not exactly the same.

To debug presentation, you need to use the DOM Explorer tab of your browsers dev tool.

<!DOCTYPE html><html><head><title>Sprout</title><metahttp-equiv="Content-Type"content="text/html; charset=UTF-8" /><styletype="text/css">h1 {
            font-family: Palatino, 'Palatino Linotype', serif;
            color: blue;
            font-size: 90px;
}

h2 {
    font-size: 32px;
}
    </style></head><body><h1>Mysample</h1><divclass="hero"><h2>Sprout.</h2><p>A book by J. Daniel Bedford</p><ahref="#">Read now.</a></div><p>&copy; Mystwood Publishers Limited</p></body></html>

Solution 2:

This also stumped me for a long time - Page looks okay in Edge\IE11 but not Chrome or Firefox. Eventually found there was nothing wrong with the HTML or CSS syntax. The fix was simple. The HTML file was encoded in UTF-16. I overwrote the file saving it as UTF-8. It now works fine in all four browsers.

Post a Comment for "Css Formatting Showing In Ie But Not Chrome Or Firefox"