Wednesday, January 30, 2008

CSS Performance Enhancing Drugs

Several times I have gone looking for an article like this on Google, and several times I have failed.  Tonight I hit just the right combination of keywords, and up popped this article straight from the horses mouth:

http://developer.mozilla.org/en/docs/Writing_Efficient_CSS

Whenever I'm writing rules for CSS, I always find myself asking questions like "Is it faster for the client rendering engine if I use #id as a selector, or if I use div#id"?  This article answers that and many other questions - and exposes several things I've been doing all wrong, thinking I was actually improving the render speed. 

BTW, from the article:

BAD - tag#id
GOOD - #id"

1 comment:

Jonah Thomas said...

I've always wondered the same thing! Thanks for the cool link!

Mostly I just wonder if the Wiggles will ever have a CSS episode. Then I would finally find out the answer to the question: "What CSS would Captain Feathersword write?"

Disqus for A Nofsinger's Blog