Question

I have a couple of web pages with css'. When I open the index page in chrome and firefox, there is no error. However when I open in internet explorer, one division will be invisible. Although I see that division in source code, when I open it by the developer tools in ie, I can not see it there. What can be the error?

Was it helpful?

Solution

Does your web page have a DTD ? Do you still have the problem if your DTD is XHTML strict ?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

IE is well known to be wildly off the standards for compatibility reasons to support pages written in the mesozoic era of IE4 and IE5 when MS thought they would rule the web over the W3C. To make sure IE is more respectful of the standards, use this DTD and there should be little cross browser issues between MSHTML, Gecko and Webkit browsers.

OTHER TIPS

Every browser receives a copy of the whole client-side source code. Sadly, Internet Explorer (IE) is lagging behind when it comes to implementing standard functionalities. For this reason, IE will not always interpret your code correctly. In fact, it will interpret the code in the way it believes it is right and not the right standard way of doing it.

For a long time, Microsoft has thought that it could be above the web standards because it has the monopoly of the market shares. This is slowly changing though. Perhaps, the expected standard compliant features of IE9 reflects the market shares loss for Microsoft in the browser wars.

Still, a great majority of users are not aware or care about browser functionality. They are more likely to not upgrade to IE9 when it comes out. Therefore, I suggest that you add the following markup in your HTML document header:

<meta http-equiv="X-UA-Compatible" content="chrome=1">

You can find more info about this here. Thank you Google!!

It would be interesting to see the faulty source code...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top