CMS Critic CMS Critic - 2 years ago 237
CSS Question

Need help eliminating flash of unstyled content on my site

I need someone who can provide me with a solution that will stop the flash of unstyled content (fouc) on my site.

It's located here:

Answer Source

What I've done to avoid FOUC is:

· Set the body section as: <body style="visibility: hidden;" onload="js_Load()">

· Write a js_Load() javascript function as:'visible';

With this approach the body of my web page keeps hidden until the full page and CSS files are loaded. Once everything is loaded the onload event turns the body visible. So, the web browser remains empty until a point when everything pops up on the screen.

It is a simple solution but so far it is working.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download