The C in CSS

Adactio says that they’ve started added an ID to the body tag of their various page types. This way that can have all their CSS in one file, and still maintain different looks for different page types.

So i guess the CSS would look like this.



<style>
#top_page h1 {
     font-family:arial;
     font-size:2em;
}
#internal_page h1 {
     font-family:verdana;
     font-size:.83em;
}


<body id="top_page">
<h1>Welcome to Yahoo</h1>
</body>

<body id="internal_page">
<!-- maybe a news article page -->
<h1>Kerry narrowly wins Wisconsin</h1>
</body>

Seems like an interesting approach. We’ve alreayd been doing this, but making the selector-ceiling various container divs instead of utilizing the body tag itself.