Crash IE6 with Pure XHTML and CSS
Right… I know this is a bit late and all… as IE7 is slowly taking over from IE6… but it is still heavily used… and when designing, I still definitely try to test all my stuff in IE6 also.
Anyway, as I was recently doing a new menu for something, I discovered that when ever I tested the page on IE6, it would crash!! So after a bit of investigation… and a lot of stripping of the code… I found that it is the most simple CSS and XHMTL page that can actually crash IE6 completely!
The code I have on the page validates 100% on W3C!!
Link to the page (I suggest you download it and try it on IE6 when you are not doing anything else with it…)
Here is the page contents:
-
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-
<head>
-
<title>test</title>
-
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1" />
-
<meta http-equiv="content-style-type" content="text/css" />
-
<meta http-equiv="content-language" content="en-GB" />
-
<style type="text/css" >
-
#shortcuts {
-
font-size: 16px;
-
text-align:left;
-
width:636px;
-
}
-
#shortcuts img {
-
padding-right: 10px;
-
}
-
#shortcuts span {
-
display:block;
-
padding-top: 10px;
-
}
-
#shortcuts a:link, #shortcuts a:active, #shortcuts a:visited {
-
padding: 5px;
-
margin:5px;
-
display:block;
-
float:left;
-
width:190px;
-
height: 70px;
-
color:#000000;
-
background-color:#ffffff;
-
background-image:url("img/home/bg1.gif");
-
text-decoration:none;
-
}
-
#shortcuts a:hover {
-
color:#ffffff;
-
background-color:#000000;
-
background-image:url("img/home/bg2.gif");
-
text-decoration:none;
-
}
-
</style>
-
</head>
-
<body>
-
Crashing IE 6 with pure XHTML and CSS :)<br />
-
This Page Is Valid XHTML 1.0 Transitional!<br />
-
W3C CSS Validator Results: No error or warning found, Valid CSS information<br /><br />
-
Hover over the Menu links<br />
-
-
<div id="shortcuts">
-
-
<a href="#"><img src="x.png" align="left" border="0" width="64" height="64" alt="1" /><span>Menu 1</span></a>
-
<a href="#"><img src="x.png" align="left" border="0" width="64" height="64" alt="2" /><span>Menu 2</span></a>
-
<a href="#"><img src="x.png" align="left" border="0" width="64" height="64" alt="3" /><span>Menu 3</span></a>
-
-
<a href="#"><img src="x.png" align="left" border="0" width="64" height="64" alt="4" /><span>Menu 4</span></a>
-
<a href="#"><img src="x.png" align="left" border="0" width="64" height="64" alt="5" /><span>Menu 5</span></a>
-
<a href="#"><img src="x.png" align="left" border="0" width="64" height="64" alt="6" /><span>Menu 6</span></a>
-
-
<a href="#"><img src="x.png" align="left" border="0" width="64" height="64" alt="7" /><span>Menu 7</span></a>
-
<a href="#"><img src="x.png" align="left" border="0" width="64" height="64" alt="8" /><span>Menu 8</span></a>
-
<a href="#"><img src="x.png" align="left" border="0" width="64" height="64" alt="9" /></a>
-
-
</div>
-
-
</body>
-
</html>
After a bit of investigation, the only way I found I could stop it from behaving odd (there were some repetition of text where there should be none)… plus of course the lovely crash!… was that I had to insert a “div clear both” in between each “row” of the menu… not ideal of course, if you want to have it dynamic and flow with the page.

Leave a Reply