HTML and CSS Reference
In-Depth Information
CHAPTER 13
■ ■ ■
Styling for Print and
Other Media
I t may come as something of a revelation to people that CSS is not just about presentation of
a web page on a computer screen—that there are ways of controlling layout, colors, and even
the sound of certain parts of your web page for other media. These other uses for CSS may not
be so well known for a few reasons, perhaps reasons that you can identify with:
The boss (or client) has never requested a media-specific design from you.
It's been “on the radar” but has never been investigated because you've heard that
browser support is a bit flaky.
There aren't enough hours in the day to worry about other media—it's a challenge just
to get the screen display working cross-browser.
If any of these ring true, then we hope that after reading this chapter you'll realize that there are
enough goodies to be found in this area to justify spending just a little extra time on style
sheets for other media types. First things first, then: how do you tell the browser, or user agent ,
what style sheets to pay attention to and which ones to ignore?
Note In most cases, when dealing with CSS you'll hear people referring to the browser, but a web browser
is just one type of user agent, defined as the piece of software that's used to access the web page. Because
we're dealing with other media types, you may encounter this slightly less user-friendly term in this chapter.
Introducing Media Types
There are many different media types that you can apply to CSS, some of which are more useful
than others, and they let you specify the look, feel, or sound of the web page that is linked to the
CSS files. In this section, we'll look at the various media types that are available (as gleaned from
the official source, namely the W3C: www.w3.org/TR/REC-CSS2/media.html#q1 ). However, rather
than list them all and suggest wonderfully practical ways to use them, we'll break the list down into
two categories: useful and not-so-useful (read: which ones you're likely to use on a day-to-day
basis in the foreseeable future and those that you won't touch in a month of Sundays).
277
Search WWH ::




Custom Search