CSS and the Force are not very alike. One of them is a dark art, taking a lifetime to master and needing super-human powers of concentration and persistence, and the other one is the Force.
Sometimes it’s frustrating to be developing a large stylesheet, only to find that part way through for some unknown reason your styles are not being picked up by a particular element. Usually, this is because it is inheriting its style from somewhere else, and it can be a quite a job to go back through the style rules and unpick what is happening.
I’ve just come across a nice little article that explains selector specificity very well, and it’s easy to remember. If you can’t, there’s even a poster you can print out to help you.
Jason posted this on Thursday, January 24, 2008 at 5:29 pm. Leave comment.