iEntry 10th Anniversary Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > HTML, XHTML and CSS

Reply
 
LinkBack Thread Tools
Old November 12th, 2008, 09:09 AM   #1
Reputable Member
 

Join Date: Jun 2007
Location: UK
Age: 30
Posts: 177
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Voodoochilli is on a distinguished road
Smile Too much CSS?

Hello! Its been a while since I've popped by, sorry! Been very busy. Typical of me to come here when I need help!

I am working on some exciting features on one of my sites, www.voodoochilli.net and it has occurred to me the css file is getting massive. Its about 20k, but more importantly its over 1100 lines of css code. I know I can tidy it up a bit (which I intend to), but I am thinking maybe there are some unused elements which are now redundant. I was wondering, does anyone know a good tool for scanning a site to find out which ones are being used and which ones aren't?

That's just the main css file, there about about 6 others being used on the site, but what's worrying me is wont browsers struggle if they have to read that much code? I know it should be cached, but still...

Also, does anyone have any experience with css compression? Is it worth it? I mean the file compression method rather than condensing the code and removing white space.

Thanks!
Voodoochilli is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old November 12th, 2008, 09:23 AM   #2
Elite Veteran
SuperMember
 
welshstew's Avatar
 

Join Date: May 2007
Location: inside the outside
Posts: 3,910
Blog Entries: 14
Thanks: 9
Thanked 40 Times in 38 Posts
Rep Altering Power: 0 welshstew has a reputation beyond repute welshstew has a reputation beyond repute welshstew has a reputation beyond repute welshstew has a reputation beyond repute welshstew has a reputation beyond repute welshstew has a reputation beyond repute welshstew has a reputation beyond repute welshstew has a reputation beyond repute welshstew has a reputation beyond repute welshstew has a reputation beyond repute welshstew has a reputation beyond repute
Re: Too much CSS?

I used to use dust-me selectors, which is a FF add-on, but since upgrading to FF3 it has stopped working.

If you have an earlier version of FF then it is a great tool
welshstew is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old November 12th, 2008, 09:28 AM   #3
Reputable Member
 

Join Date: Jun 2007
Location: UK
Age: 30
Posts: 177
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Voodoochilli is on a distinguished road
Re: Too much CSS?

Oh right I did upgrade FF too. Did it work well though? Did you have to visit all the pages on the site? (mine has over 22k pages, still most of them use the same CSS)
Voodoochilli is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old November 12th, 2008, 11:04 AM   #4
Elite Veteran
SuperMember
 
welshstew's Avatar
 

Join Date: May 2007
Location: inside the outside
Posts: 3,910
Blog Entries: 14
Thanks: 9
Thanked 40 Times in 38 Posts
Rep Altering Power: 0 welshstew has a reputation beyond repute welshstew has a reputation beyond repute welshstew has a reputation beyond repute welshstew has a reputation beyond repute welshstew has a reputation beyond repute welshstew has a reputation beyond repute welshstew has a reputation beyond repute welshstew has a reputation beyond repute welshstew has a reputation beyond repute welshstew has a reputation beyond repute welshstew has a reputation beyond repute
Re: Too much CSS?

Nope, you just needed to hit the homepage and it would work it's way through the navigation structure. worked great from what I can remember.
welshstew is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old November 12th, 2008, 01:20 PM   #5
Reputable Member
 

Join Date: Jun 2007
Location: UK
Age: 30
Posts: 177
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Voodoochilli is on a distinguished road
Re: Too much CSS?

Cool, thanks. I'll see if I can get that working.
Voodoochilli is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old November 12th, 2008, 02:08 PM   #6
Reputable Member
SuperMember
 
bonnit's Avatar
 

Join Date: Apr 2008
Location: uk
Age: 24
Posts: 188
Blog Entries: 1
Thanks: 7
Thanked 19 Times in 19 Posts
Rep Altering Power: 0 bonnit is on a distinguished road
Re: Too much CSS?

https://www.aggiorno.com/blogs/aggio...electors-.aspx

this page has reference to a few online services, a couple of the links are out of date if i recall but useful :P
bonnit is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old November 16th, 2008, 11:57 AM   #7
Aso
Most Reputable Member
 

Join Date: Oct 2007
Location: UK
Posts: 1,633
Blog Entries: 2
Thanks: 22
Thanked 84 Times in 79 Posts
Rep Altering Power: 0 Aso is on a distinguished road
Re: Too much CSS?

Yeah, 20K is quite a bit for CSS. The tools already suggested should hopefully cut down on any old declarations that are no longer needed.

Also make use of inheritance and selectors. Don't apply the same class to loads of the same elements, when you can simply contain them all in one container, and just use;
Code:
.container element {styles}
I wrote a few articles on keeping your CSS tidy, and keeping it slim too


Quote:
Also, does anyone have any experience with css compression? Is it worth it? I mean the file compression method rather than condensing the code and removing white space.
As you say, there are compressors out there that strip out as much as it can, but depending on how well coded your CSS is, it might only ever shave off a few 100 bytes.

The best method is to gzip your CSS. Either on-the-fly or with a URL rewrite, it can be up to 70% less in size than uncompressed!
Aso is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks

Tags
compression , css , file size


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Search Engine Optimization by vBSEO 3.2.0 RC8