March 4, 2006
Follow me on Twitter

CSS trick: body classes

Ryan Singer runs down a handy CSS trick I've found useful in Flint and elsewhere.

All HTML files enclose the page content in a <body > tag. If you have a site with different kinds of pages -- a weblog with a Main Page and individual Post Pages, perhaps -- you add a class or ID to the body tag. > Then, your stylesheet can easily say things like "pages are red, except the main page is blue".