2 replies [Last post]
Last seen: 16 years 49 weeks ago
Timezone: GMT+1
Joined: 2005-12-21
Posts: 6
Points: 0

i see info on the web that most css files are quite small - under 1K. Is that right? I have a 6K file and it doesnt hold really that much - about 30 entries, 5-7 atributes per entry on average, is this size normal? I guess once ive finished i'll be shorthanding and crunching it, but Im wondering if there is something i dont know - 6K seems a lot.

Chris..S's picture
Last seen: 10 years 10 weeks ago
Timezone: GMT+1
Joined: 2005-02-22
Posts: 6078
Points: 173

.css file size

6k isn't much.

CSS files can be quite small if you don't use much spacing or include comments. But you need those things, at least in your development copy.

CSS files are cached by browsers so a few kb here or there isn't a problem.

Hugo's picture
Last seen: 7 years 46 weeks ago
Joined: 2004-06-06
Posts: 15668
Points: 2806

.css file size

As Chris says 6k really isn't large you can see daft advice around about keeping to single packet transmission size, don't worry until you start to see your file hit the mid teens and even then on a dialup connection it don't take that long and once cached it's cached I have a a file in progress at the moment that's for a relatively complex layout that is in effect three layouts in one this has now reached 15k which is where I start to keep a close eye on things, I could perhaps break the sheet up but nothing would be gained really but I'm not going to sweat it, it still loads fast enough, the forum stylesheet is around 15k and I doubt much could be shaved off it that would make any noticeable difference.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me