Book HomeCascading Style Sheets: The Definitive GuideSearch this book Wednesday 13th of December 2017 08:04:23 PM

A.2. Tips, Pointers, and Other Practical Advice

Once you've gotten through all the general information and checked your documents for errors, you'll probably be looking for some real-world advice on how to use CSS, where some pitfalls may be, and why your letter-perfect CSS isn't displaying in quite the way you think it should.

A.2.1. Style Sheets Reference Guide (SSRG)

http://www.webreview.com/style/index.shtml

This site is home of the Browser Compatibility Charts, which is its main claim to fame. The Chart is a listing of every property and value in CSS1 and the status of its support in each of several major browsers, with notes explaining the ratings. As of this writing, the Chart covered 10 major browser versions, with more expected, and there were plans afoot to add CSS2 support tracking to the charts as well. Let's say you want the line-height of allelements in a document to be one-and-one-half times theirfont-size. You would declare:

BODY {line-height: 1.5;}

This scaling factor of 1.5 is passed down fromelement to element, and at each level the factor is used as amultiplier of the font-size of each element.Therefore, the following markup would be displayed as shown in Figure 8-64 (backgrounds added for illustrative purposes):

The SSRG is also the home of the Web Review column "A Sense of Style," with archives of all the articles, and sections devoted to CSS question and answers, common mistakes with CSS, cool ways to use styles, and more. (Disclaimer: the SSRG is edited and maintained by the author of this book.)

A.2.2. CSS Pointers Group (CPG)

http://css.nu/

Maintained by CSS gurus Sue Sims and Jan Roland Eriksson, the CPG is a wonderful collection of articles, bug reports, workarounds, and literally hundreds of other resources. Many of the pointers listed are simply links to material generated by various people throughout the Web, but some of the best articles are the work of Sue and Roland themselves. The site can be a little difficult to navigate at first, but the enormous wealth of information available through these pages makes the effort well worth it.

A.2.3. WSP CSS Samurai Reports

http://www.webstandards.org/css/

A series of documents detailing the major failings in CSS support in available web browsers, written by the CSS Action Committee -- or, as they are sometimes called, the "CSS Samurai" -- of the Web Standards Project (WSP). As of this writing, there were reports covering Internet Explorer for both Windows and Macintosh, and Opera for Windows. These reports offer an interesting insight into what can go wrong in browser support, what designers want to see, and how to test for CSS support problems.

A.2.3.1. Agitprop

http://style.cleverchimp.com/

A small collection of articles and observations written by Todd Fahrner, this site is a gold mine of detailed information. Each and every one of the articles here contains information CSS authors can use and should know by heart, from "The Amazing em Unit" to "Why Points Suck." This site should be visited by anyone serious about understanding the design trade-offs inherent in any design project, and the special issues surrounding CSS design in particular.



Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.

another. Note that sub does not imply a change in the element's font size, so it should not cause subscripted text to become smaller (or larger). Instead, any text in the subscripted element should be, by default, the same size as text in the parent element, as shown in Figure 4-32:

SUB {vertical-align: sub;}
<P>This paragraph contains <SUB>subscripted</SUB> text.</P>
Figure 4-32

Figure 4-32. Subscript alignment

attribute has the value en, en-US, en-UK, en-Cockney, and so on.

In fact, this can be used to match any value with a similar format. For example, if you have images with ALT text of fig-1, fig-2, fig-3, and so on, and want to match any of them, you could use this selector: