
IE6 Nasty CSS Freeze
October 30, 2007I was pulling my hair out for most of the day. I had a page that was working fine in Firefox and Safari, but every time a certain AJAX response came back, IE 6 would hang. It would go to 90% CPU and need to be killed from Task Manager.
I spent hours digging through JavaScript and ERB code, commenting things out, trying to track it down. I got it down to a single table. I commented out various parts of the ERB generating the table for about an hour. The syntax was fine. I was sure the code had no bugs. Getting frustrated I removed almost everything from the table. It was when I removed the style attribute that things finally started working.
Here’s the change that got it working in the end:
/* padding: 5px 0px 5px 0px; */
padding-left: 5px;
padding-top: 5px;
They do exactly the same thing, but for some reason the first is big trouble. Google points me to other people who have had this problem. From what I can tell, it may be triggered only inside floating div’s. I probably had one of those but was ready to call it a day once I found the problem.
If you are experiencing a nasty IE6 freeze then check your CSS for shorthand padding like the above.
Did that really do it? I think it did but as it turns out the two are not equivalent. Anyway, I ended up turning padding into margin in the end, which definitely fixed it but was not what I meant. Still, we have to continue to indulge IE6. I am happy to see the IE6 browser share has dropped below 20% in my log files.
sweet yo………………..had a big prod issue with this ONE………..thank yo so much. Solved my problem.
i love Bill Gates……………………and his IE
Had the same problem with IE6 and CSS but I had to delete »white-space: no-wrap;« now it works
The main cause is the style white-space: nowrap;
This is a “known” bug in IE6 and fixed in IE7
There are 2 workarounds to this issue
1. wrap the text in . This can still cause issues in somecases.
2. replace all spaces with
The later works best.
opps HTML removed fixed 1. which is wrap the text in NOBR tags