Graphics Programs Reference
In-Depth Information
Setting a Media Type Attribute for a Style Sheet
You will set a media type attribute of all for the nbf_styles.css style sheet. To designate a
media type attribute that applies to an entire style sheet, you add a media tag and open-
ing bracket before the fi rst style in the style sheet and a closing bracket after the last style.
Because you want the main style sheet to be available to all media types, you insert the
following code to designate all as the media type:
@media allƒ{
All the code for styles in the style sheet.
}
If you want the style sheet to apply to a single media type, you change all in the fi rst
line of code to the desired media type. If you want the style sheet to apply to a group
of media types, replace all with the names of the different media types separated by
commas.
You'll set the NextBest Fest style sheet to apply to all media types.
To set the all media attribute for the nbf_styles.css style sheet:
1. On the Related Files toolbar, click the nbf_styles.css button, and then switch to
Code view.
2. Place the insertion point at the beginning of Line 2, and then press the Enter key.
A blank line is added into the code.
3. Place the insertion point in the blank line, and then type @media all { in the blank
line. The code changes to a dark red color. See Figure 8-39.
Figure 8-39
Media attribute added to the nbf_styles.css style sheet
all media
attribute inserted
4. Scroll to the bottom of the page, place the insertion point after the last closing
bracket, and then press the Enter key to insert a blank line.
5. Place the insertion point in the blank line, and then type } in the blank line. The
closing bracket changes to a dark red color. See Figure 8-40.
Search WWH ::




Custom Search