> From: Zoe M. Gillenwater
> 
> Exactly. FOUC is a very specific bug. It means that *none* of 
> the styles are loaded initially. I'm guessing they are, and 
> it's just the background image that isn't loaded 
> instantaneously. Again, Riva, do the styles on the fonts show 
> up right away? Try making your text an outlandish color like 
> bright red. Does that show right away? If so, it's not FOUC. 
> It's a totally different bug.

Well, I wouldn't go quite that far. You're right, a total FOUC is typical,
but you could also have a partial FOUC.

I have a calendar widget that momentarily lacked some custom styles as it
loaded. It was mostly right, and the rest of the page was unaffected. The
widget loaded a custom stylesheet dynamically through JavaScript DOM methods
after the page was loaded, so some but not all of its styles were ready when
it first rendered. (The reasons for this curious design are beyond the scope
of this discussion...)

My solution was to wrap the widget's HTML code in a DIV like this:

  <div class="Hider">
    ... Widget content here ...
  </div>

and add this to the standard .css file - which is LINKed in HEAD in the
proper way, so the style is ready before the page renders:

.Hider { display: none; }

And this at the end of the custom CSS file:

.Hider { display: block; }

So the widget is hidden until the custom CSS is loaded.

-Mike

______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to