Prev | Current Page 81 | Next

Tommy Olsson and Paul O'Brien

"The Ultimate CSS Reference"

png);
background-repeat: no-repeat;
background-attachment: fixed;
background-position: right top;
Unlike the shorthand for box-related properties, when we??™re combining related
properties, the order of the values is usually not relevant. That said, be sure to check
each property for the required syntax.13
If a value is omitted, the initial value (p. 39) will be assigned to the corresponding
property. Look at this declaration:
background: url(bg.png);
It??™s the same as these:
background-color: transparent; /* initial value */
background-image: url(bg.png);
background-repeat: repeat; /* initial value */
background-attachment: scroll; /* initial value */
background-position: 0% 0%; /* initial value */
Omitted values aren??™t ignored, so attempts to mix shorthand and standard
declarations like the following are doomed to fail (they??™re also likely to confuse
anyone who??™s looking at the code):
General Syntax and
Nomenclature
13 We prefer to use the order in the CSS2.1 specification.


Pages:
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93