Home > monochrome_lq

Welcome to my new Ode site! More...

Thu, 23 Sep 2010

IE 'pre' Rendering Bug

I witnessed a peculiar thing as I was testing this theme on my web host's server...

Originally, I used <p id="content_header"> to hold the ASCII fish header image, and set #content_header to preserve whitespace with white-space:pre. However, I noticed that in Internet Explorer 6–8 the ASCII fish was not drawn completely; it's as if the characters comprising the ASCII fish were being shot out of a fire hose, which overwhelmed IE's rendering pipeline and hosed the fish before it got done rendering.

This bug only rears its ugly head when the page is loaded from a remote web server; it renders fine when the page is loaded from your hard drive or local server.

The fix was very simple: I just changed <p id="content_header"> to <pre id="content_header"> and removed the white-space:pre property from #content_header. You can still reproduce the bug by going back in time to the Monochrome beta page.