Archive for the ‘HTML / CSS’ Category


IE6 Nasty CSS Freeze

October 30, 2007

I 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.