Graphics Programs Reference
In-Depth Information
Table 7-1
(continued)
Term
Description
device-width
The width of the device's display area (e.g., a desktop monitor or
mobile device display).
device-height
The height of the device's display area.
orientation
The way the display is oriented; the two values are portrait and
landscape.
aspect-ratio
The ratio of the display area's width to its height. Values are two inte-
gers separated by a forward slash.
device-aspect-ratio
The ratio of the device display's width to its height. Values are two
integers separated by a forward slash.
color
The color bit-depth of the display device. Values are unitless integers
which refer to the bit depth. If no value is given, then any color display
will match.
color-index
The number of colors maintained in the device's “color lookup table.”
Values are unitless integers.
monochrome
Applies to monochrome (or grayscale) devices.
resolution
The resolution of the device display. Values are expressed using units
dpi or dpcm.
240
scan
The scanning type of a “TV” media device; the two values are progres-
sive and interlace.
grid
Whether the device uses a grid display (e.g., a TTY device). Values are
0 and 1.
STYLING OCCASIONAL CHILDREN
h ere are times when you may want to select every second, third, i t h, eighth, or thirteenth
element in a series. h e most obvious cases are list items in a long list or rows (or columns) in
a table, but there are as many cases as there are combinations of elements.
Consider one of the less obvious cases. Suppose you have a lot of quotes that you want to l oat
in a sort of grid. h e usual problem in these cases is that quotes of varying length can really
break up the grid, as evident in Figure 7-7.
A classic solution here is to add a class to every fourth div (because that is what encloses
each quote) and then clear it. Rather than clutter up the markup with classes, though, why
not select every fourth div (see Figure 7-8)?
.quotebox:nth-child(4n+ 1) { clear : left ;}
Search WWH ::




Custom Search