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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CSS : How big is too big? 1

Status
Not open for further replies.

Sleidia

Technical User
May 4, 2001
1,284
FR

Hi guys,

I have a CSS file that I use for my custom CMS.

Since this CMS is designed in such a way that every single part of the layout can be totally controlled from this CSS file and that every module/page can be styled separately, I end up with a file currently taking 50kb and containing 2000 lines of code (and it will grow more soon).

From what size can it become unsafe?
Should I split the file "per module"?
What's the maximum number of external CSS files that can I embed in the html?

Thanks :)
 
There's no point including CSS that the user won't need to use, so if you have different sections of your site, why not split the files into different CSS files based on the area of the site. Then, if a user visits that section they can download the CSS file and cache it (which will negate the downloading of excessive CSS data from your one file).

There is no limit on the number of CSS files as far as I know.


____________________________________________________________
Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]

Need help finding an answer? Try the Search Facility or read FAQ222-2244.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top