Blog of Steve Savage A blog for business analysts, and fellow users of Sparx's EA

17Jul/030

Display of unformatted html in Internet Explorer

Problem addressed

Flash of unformated content when WIN IE is loading a page

Solution

  1. Use <link href="..." rel="stylesheet" type="text/css" /> instead of
    @import in the head of your document.
    Using @import within an external stylesheet
    to import additional stylesheets does not seem to cause any problems.

  2. The existence of a <script> element (empty will do) inside of the document's
    head will prevent the flash of unstyled content.

I prefer the first option with the additional use of IE conditional comments to prevent the flash,
and to provide a browser specific stylesheet for WIN IE 5+.

Background

WIN IE has an annoying bug that causes the browser to start displaying a document before it has finished
loading all the applicable CSS, causing the page to start being displayed, before it has been formatted.
But there are a few simple ways to stop that flashed display of unformatted content.

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

(required)

No trackbacks yet.