Forum Moderators: not2easy

Message Too Old, No Replies

stylesheet too slow

homepage looks terrible till css clicks in

         

annej

1:52 am on Aug 9, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I switched to using

<style type="text/css"> @import url("mystyle.css"); </style>

instead of

<LINK rel=stylesheet type="text/css" HREF="mystyle.css">

as I like the way the css doesn't apply to old browsers with @import. The only problem is there is a brief lag before the css clicks in using @ import where with LINK it clicks in instantly. I don't like my visitors seeing the poor view of my page as first impressions make a big difference on the Internet.

It doesn't seem to matter what browser of if it's on an Apple or a PC. It does it on all the newer browsers.
Any ideas to solve this problem?

toothfish

2:22 am on Aug 9, 2003 (gmt 0)

10+ Year Member



I think what you're seeing is this [bluerobot.com]. Mr. Robot describes it much more eloquently than I could.

annej

4:42 am on Aug 9, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks for guiding me to a great fix! "Flash of Unstyled Content" (FOUC) describes the problem perfectly.

I just did

<LINK rel=stylesheet type="text/css" HREF="mybasics.css">

<style type="text/css"> @import url("mystyle.css"); </style>

I put the overall background and text color and style in mybasic so even the old browser get that.

The rest of the css is in mystyles.

It works perfectly.