Prev | Current Page 50 | Next

Charles Wyke-Smith

"Stylin' with CSS: A Designer's Guide 2nd Edition"


For example, if you need to make changes that affect the whole site
(???The client wants all the paragraph text to be blue, not black.???),
doing so can be as quick and painless as modifying one CSS style.
This is certainly much easier than the pre-CSS task of modifying
every FONT attribute of every paragraph tag in every page of
the site.
You can link your style sheet to as many XHTML pages as you want
with a single line of code in the head of each XHTML page:
rel="stylesheet" type="text/css" />
Then the styles are applied to each page??™s markup as the page loads.
Note that, in the above link tag, the media attribute is de?¬? ned as
"screen", meaning the style sheet is designed for the screen, which
currently means Web browsers. (Certain user agents look for particular
media attributes that best suit their display capabilities;
possibilities here include: all, projection, handheld, print and aural.
See a full list on the W3 Schools site (www.w3schools.com/css/
css_mediatypes.asp).
A browser reads a style sheet where the link tag media attribute is
all or screen. But by adding a second link tag with the media attribute
of "print", you can offer a second style sheet that the browser
will use when printing. A style sheet for printing might hide navigational
and other elements that don??™t make sense when the content
goes to paper.


Pages:
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62