IE8 is a vast improvement on IE6 in terms of rendering HTML and CSS; however now and again there still seem to be some oddities compared to other browsers.
Having spent the best part of a day trying to debug the code which had been validated by http://validator.w3.org/ (as XHTML 1.1 Strict ) and http://jigsaw.w3.org/css-validator/ (as CSS 2.1), IE8 was still having trouble rendering the page and was drawing a div twice.
Ultimately it boiled down to an anchor tag being closed in short form. i.e. <a id="someAnchor" />. After changing this to <a id="someAnchor"></a>, everything worked fine and was bang on again in IE8.
Lesson learnt that if IE8 appears to be rendering incorrectly, check which tags are being closed in which way. Not saying this is the answer to every rendering issue in IE8 but it's something to look out for if HTML and CSS code is perfectly valid, rendering correctly in all other browsers (Chrome, Firefox, Safari, etc.), but getting screwed in IE8.
On a side note.... according to netmarketshare (http://www.netmarketshare.com/browser-market-share.aspx?qprid=2) 17.17% of users are still browsing with IE6 and 11.79% with IE7. Seriously, people should either upgrade or move to a different browser.
Having spent the best part of a day trying to debug the code which had been validated by http://validator.w3.org/ (as XHTML 1.1 Strict ) and http://jigsaw.w3.org/css-validator/ (as CSS 2.1), IE8 was still having trouble rendering the page and was drawing a div twice.
Ultimately it boiled down to an anchor tag being closed in short form. i.e. <a id="someAnchor" />. After changing this to <a id="someAnchor"></a>, everything worked fine and was bang on again in IE8.
Lesson learnt that if IE8 appears to be rendering incorrectly, check which tags are being closed in which way. Not saying this is the answer to every rendering issue in IE8 but it's something to look out for if HTML and CSS code is perfectly valid, rendering correctly in all other browsers (Chrome, Firefox, Safari, etc.), but getting screwed in IE8.
On a side note.... according to netmarketshare (http://www.netmarketshare.com/browser-market-share.aspx?qprid=2) 17.17% of users are still browsing with IE6 and 11.79% with IE7. Seriously, people should either upgrade or move to a different browser.
Comments
Post a Comment