Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CSS delay when page is opened

Status
Not open for further replies.

sannabel

Programmer
Jun 20, 2008
2
GB
I have set up a site with an external style sheet, my client is complaining about the split second when the page is viewed before the style sheet kicks in, (an un-styled webpage) . Does anyone know a way around this? They are demanding it to be amended, I really don't know what else to say to them!!! Please help! Anyone!
 
For what it's worth I didn't see any delay but this is the reason you are getting it

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

The @import directive will cause this. Try changing it to

Code:
<link src="impact.css" type="text/css" />

This should remove any delay.

--
Tek-Tips Forums is Member Supported. Click Here to donate

<honk>*:O)</honk>

Tyres: Mine's a pint of the black stuff.
Mike: You can't drink a pint of Bovril.


 
Thank you so much!!!!!!!!!!!!
I used to do it like that but changed it after reading a book about css!
Thanks anyway!
 
Back in the olden days, the @import method was recommended because it hid the stylesheet from Netscape 4.x . That browser's implementation of CSS was so bad that it was better to give them no styles at all (or a basic stylesheet if you were feeling kind).

Nowadays, nobody uses NS4. Or if they do, they must be pretty used to seeing the web through broken CSS spectacles. So there's no reson to use the @import method any more.

The techie term for this phenomenon, incidentally, is a FOUC - a Flash Of Unstyled Content. Google provides some interesting reading on the subject (it can be caused by other things than @import).

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top