Page 1 of 1

CSS Loading

Posted: Thu Jun 11, 2009 10:24 am
by sirstrumalot
Okay, simple question:
Why is is that when I access my webpage from any particular place, the page will load without the CSS styles for just a split second and then it looks normal? How do you get around this so that the page always loads correctly from the visible beginning?

Re: CSS Loading

Posted: Thu Jun 11, 2009 11:52 am
by mikemike
It's just how the browser loads elements, ytou can't change it really.

The same thing happens to me on my slow connection when i visit websites sometimes, and it's not small time sites either, things like Facebook, MSN, etc.

You could always style everything inline, but I'd recommend against that.

Re: CSS Loading

Posted: Thu Jun 11, 2009 3:28 pm
by omniuni
Oddly enough, sirstrumalot, not only do most browsers parse the CSS after the HTML, but some websites actually encourage this by putting the link to the CSS towards the end of the file. It actually speeds up page display. That said, to keep things as smooth as possible for display, make your HTML and CSS as efficient as possible, and if you use images for backgrounds, approximate it first with a color.