HTML and CSS Reference
In-Depth Information
Figure 1-3. The results of a property value with multiple keywords
the seven keywords add up to a single, unique value. We can redefine the value for
rainbow as follows:
rainbow: infrared red orange yellow green blue indigo violet ultraviolet;
Now we have a new value for rainbow composed of nine keywords instead of seven.
Although the two values look mostly the same, they are as unique and different as zero
and one. This may seem an abstract point, but it's critical to understanding some of
the subtler effects of specificity and the cascade (covered in later in this topic).
There are a few exceptions to the space-separation rule, most of them
having come aboard in CSS3. Originally, there was but one exception:
the forward slash ( / ) permitted in the value of font . Now there are sev-
eral instances of symbols like that being used in values, as well as
comma-separated lists of values for certain properties.
Those are the basics of simple declarations, but they can get much more complex. The
next section begins to show you just how powerful CSS can be.
Grouping
So far, we've seen fairly simple techniques for applying a single style to a single selector.
But what if you want the same style to apply to multiple elements? If that's the case,
you'll want to use more than one selector or apply more than one style to an element
or group of elements.
 
Search WWH ::




Custom Search