Graphics Programs Reference
In-Depth Information
types that support them. This does not mean that the page looks the same on all devices
because some devices cannot display certain types of styles. For example, aural assistive
devices cannot display colors because colors cannot be interpreted as sound.
Because of the limits of different devices, some CSS properties are designed to be used
only with certain media types. Most of the time, a property's limits can be determined
with common sense. For example, the page-break-before property is used only with the
print media type because screens and other devices do not display page breaks.
Most CSS properties can be displayed on many media types; however, some CSS
properties work best when different values are specifi ed for specifi c media types. For
example, you might create a style that displays the body font size at 12 pixels for screen
media and then create an alternate style that displays the body font size at 10 points for
print media.
Choosing a Media Type
Only three of the 10 currently available media types are supported widely—all, screen,
and print. Of course, all is an effective choice for media type because it specifi es that
styles be used with any device. If you do not add a media type attribute to a site's style
sheet, the style sheet by default will display on all media types. The purpose for having
an all type is that the default display might change in the future. Adding the all media
attribute ensures that the style sheet will continue to display on all media types even if
the default changes in the future.
Most computers use the screen media type and most printers recognize the print
media type. Because of this, these media types are most frequently used by designers.
Many sites use the screen media type for the main style sheet and then have an alternate
print style sheet.
Some designers create alternate style sheets using the handheld media type to custom-
ize the Web pages for display on mobile user agents. Unfortunately, many mobile user
agents do not support media types well and some do not support media types at all. This
might change in the future as standards continue to develop.
Decision Making: Achieving Wide Accessibility
You should understand media types and be able to use them effectively to maximize the
value of the site that you create. Because different user agents apply different media
types, you can achieve the widest possible accessibility for a Web site by specifying all
as the media type for the main style sheet and then creating alternate styles for specific
media types as appropriate. If a Web site is targeted to users of specific assistive devices,
you might consider creating an alternate style sheet that is optimized to accommodate
the specific device. In general, it is a good idea to use general accessibility guidelines
when creating Web pages and to ensure that all user agents have access to the site.
Gage has decided that the nbf_styles.css style sheet should display on all media types.
Because many users print the pages of the NextBest Fest site when gathering information
about the fest, he also wants you to create specifi c styles that optimize the site for print.
Previewing a Print Version of Web Pages
Before adding media type attributes to a style sheet, it is a good idea to preview the cur-
rent pages of the site, in their current state, in all the media you intend to create a cus-
tom display for. You have previewed the NextBest Fest pages in a browser many times.
However, you have not previewed a print version of the pages. You will use the browser's
print preview to view each page as it will appear when printed. You want to look for
items that disrupt the fl ow of the pages or that do not display correctly.
 
Search WWH ::




Custom Search