Fun with body IDs
16th January 2003
Mark has hit on the clever idea of using the body
tag’s id
attribute to apply different styles to different pages all from the same stylesheet. The technique is very neat, but it would be even neater if he combined it with Eric Meyer’s CSS Signatures to allow advanced users to specify their own styles for his site. Since the ID attribute can’t be overloaded with more than one value doing so would probably mean having to use the body
tag’s class
attribute as well—the id
attribute could hold the signature while the class attribute specified the page (or vice versa).
More recent articles
- Notes from Bing Chat—Our First Encounter With Manipulative AI - 19th November 2024
- Project: Civic Band - scraping and searching PDF meeting minutes from hundreds of municipalities - 16th November 2024
- Qwen2.5-Coder-32B is an LLM that can code well that runs on my Mac - 12th November 2024