CSS documents
Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Web Design Discussion
Forum Description: Discussion on web design and development subjects.
URL: https://forums.webwiz.net/forum_posts.asp?TID=27648
Printed Date: 28 March 2026 at 6:02am Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com
Topic: CSS documents
Posted By: nava
Subject: CSS documents
Date Posted: 31 July 2009 at 6:42am
Hi all
Can you have a CSS document that is too long?
I'm doing a new site and the CSS seems to be neverending, is it ok if there are lots of lines?
|
Replies:
Posted By: WebWiz-Bruce
Date Posted: 31 July 2009 at 8:11am
I can't see why not, however you need to remember that the CSS file needs to be downloaded to the visitors browser, so the bigger the CSS file the slower your website will be.
------------- https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting
|
Posted By: jamieellis
Date Posted: 05 August 2009 at 8:45pm
|
Wouldn't worry too much, it would have to be absolutely huge to slow down a modern broadband connection, and even hundreds of lines seems to be now problem for all the major browsers.
|
Posted By: WebWiz-Bruce
Date Posted: 06 August 2009 at 12:29pm
Thats is true but there are still allot of people on dial up connections. Also allot of people use mobile connections now which unless you are in a 3G area tend to crawl along at dial up speeds.
Large CSS files also contribute to your bandwidth allocation.
You maybe better off splitting up the CSS file into smaller CSS files then include only those CSS files that you need for a particular page rather than limping them all together and including the whole lot in every page.
------------- https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting
|
Posted By: omergon
Date Posted: 22 December 2009 at 1:54pm
I think it will not be problem unless your css size more than 20kb and beware more than 1 css, that slow downs browsers.
------------- http://www.akupunkturile.com" rel="nofollow - Akupunktur
|
Posted By: Mamady
Date Posted: 27 December 2009 at 12:21pm
there are no technical limits to the length of the css file, but as others have noted, its all about user experience.
What you may find is that your content is loaded, and then it suddenly "jumps" into place after the css file is downloaded and the page rerendered.
------------- http://www.virvo.com" rel="nofollow - Web Development
http://www.phptoruby.com" rel="nofollow - PHP to Ruby reference
|
Posted By: WebWiz-Bruce
Date Posted: 28 December 2009 at 9:33am
Large CSS files also course a performance problem, as from memory I do recall reading an interesting article on this subject that mentioned that most browsers will stop loading in anymore content while they load in a CSS or JavaScript file, so it's best to keep these shorter if you want your page to load faster, or place the CSS within the page itself.
Other content such as the page itself and images will load in simultaneously, it's only when the browser goes to load in the CSS or JavaScript files will the browser stop simultaneously loading in other contant at the same time.
------------- https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting
|
|