Forum Moderators: not2easy

Message Too Old, No Replies

CSS - too big?

         

smallcompany

10:44 pm on Nov 15, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



What do you consider to be a big CSS file if you use a single one for your site?

What do you use for reference, size or number of lines? I know it goes down to the same thing, less lines, lesser the size is, still...

Xapti

7:02 am on Nov 17, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



All relative to how big your site is. Essentially you have no limits, since even the most bloated CSS code will usually be many times smaller than the rich site content such as images. The question is perhaps a little better suited for javascript, since people can get carried away with lugging on lots of code, and the kiloBytes add up.

Overall, you're probably fine if CSS is under a small fraction such as 10-20% (ridiculously high) of everything else.
The main question to ask would really be "how big should ALL my site content add up to?" since that's what counts... doesn't really matter if it's 90% images, 10% everything else.
Of course to get to an optimal (small) size, chances are you will have to tweak down the image quality, resulting in a lower percentage.

The overall site size depends on what areas of the world you are catering to, as well as what technologies (cellphone/portable ($$/kb, also not too fast), 56k (slow), gamers or business (usually highspeed)).

Personally I have two conclusions for my opinion on this:
One: CSS size isn't really a factor... the big player is usually images.
Two: I really like to keep my CSS as orderly and concise/small as possible, not for size reasons, but nor manageability. The smaller your CSS is, the easier you can jump to specific CSS declarations, and find the right spot to add new ones. Small CSS files can easily be managed by hand, without any website management software or page editor applications.

[edited by: Xapti at 7:06 am (utc) on Nov. 17, 2007]

smallcompany

9:13 pm on Nov 17, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Thanks very much. Very clear and helpfull.