Chapter 15: Styling body

 < Day Day Up > 



Overview

One of the benefits of separating content from presentation is flexibility. By using CSS to control a site's layout (as we saw in Chapter 12), we can control an entire site's design. Change a few rules, and instantly and dramatically update thousands of pages.

Just one example of the flexibility gained from choosing to use CSS to control a site's layout comes from styling the <body> element. By adding a class or id to the <body> tag, you can take advantage of customized control over any element on the page, eliminating the need for duplicating shared rules.

In this chapter, we'll discover how adding class to the <body> element enables us to toggle between two separate layouts while sticking with the same markup structure.



 < Day Day Up > 



Web Standards Solutions. The Markup and Style Handbook
Web Standards Solutions: The Markup and Style Handbook (Pioneering Series)
ISBN: 1590593812
EAN: 2147483647
Year: 2003
Pages: 119
Authors: Dan Cederholm

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net