Daily ArchiveThursday, September 21st, 2006
Uncategorized 21 Sep 2006 07:39 am
Windows CRLF IE whitespace bug
Lately I’ve been doing a lot more html/css than I’ve done for several years. It’s good to be back in it, and it’s somewhat of a relief to be targeting IE6 and better. By better of course I mean Firefox.
Besides the amazing 3 pixel gap bug I had to hunt down, I’ve spent a load of time ironing out IE6 issues.
Yesterday’s fun was a small amount of space above the headlines in some pages.
It only showed up in IE – Firefox was fine. After reducing the included files to no more than a word of plain text – and both included files were going into the same template – I took a look at the files themselves.
It turns out that all the misbehaving files were saved with Windows line endings (CRLF). I had to actually create new files and copy in the content to fix the issue – doing a Save As didn’t do it.
I’m not sure how these files came to be as all the development’s been done on a Mac using TextMate. But something to look for if you see inexplicable addition of whitespace in your pages in IE.