How to Use This Appendix


Each CSS property's description contains the following attributes:

  • Usage A description of the property

  • CSS1 values Legal CSS1 values and syntax

  • CSS2 values Legal CSS2 values and syntax

  • Initial The initial value

  • Applies to Elements to which the property applies

  • Inherited Whether the property is inherited

  • Notes Additional information

Deciphering CSS values is an exercise that requires patience and a strict adherence to the rules of logic. As you refer to the values for each property listed in this appendix, you should use the following scheme to understand them.

Values of different types are differentiated as follows:

  • Keyword values Keywords are identifiers, such as red, auto, normal, and inherit. They do not have quotation marks.

  • Basic data types These values, such as <number> and <length>, are contained within angled brackets to indicate the data type of the actual value used in a style statement. It's important to note that this refers to the data type and is not the actual value. The basic data types are described at the end of this appendix.

  • Shorthand reference Values that are enclosed in angled brackets and single quotation marks, such as <'background-color'> within the background property, indicate a shorthand method for setting the desired value. The values identified in _background-color are available for use in the background property. If you choose to set the background color for the document body, for example, you can choose to do so by using either body { background: red } or body { background-color: red }.

  • Predefined data types Values within angled brackets without quotation marks, such as <border-width> within the 'border-top-width' property, are similar to the basic data types but contain predefined values. The available values for <border-width>, for example, are thin, thick, medium, and <length>.

When more than one value is available, they are arranged according to the following rules:

  • Adjacent words Several adjacent words indicate all values must be used but can be in any order.

  • Values separated by a bar "|" A bar separates two or more alternatives, only one of which can occur.

  • Values separated by double bars "||" The double bar separates two or more options, of which one or more must occur in any order.

  • Brackets "[]" Brackets group the values into statements that are evaluated much like a mathematical expression.

When evaluating the values listed in this appendix, the order of precedence is that adjacent values take priority over those separated by double bars and then single bars. In addition to this, modifiers may follow each value or group of values. These are the following:

  • * (asterisk) The preceding type, word, or group occurs zero or more times.

  • + (plus sign) The preceding type, word, or group occurs one or more times.

  • ? (question mark) The preceding type, word, or group is optional.

  • {} (curly braces) Surrounding a pair of numbers, such as {1,2}, indicates the preceding type, word, or group occurs at least once and at most twice.




Sams Teach Yourself Web Publishing with HTML and CSS in One Hour a Day
Sams Teach Yourself Web Publishing with HTML and CSS in One Hour a Day (5th Edition)
ISBN: 0672328860
EAN: 2147483647
Year: 2007
Pages: 305

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net