Prev | Current Page 90 | Next

Charles Wyke-Smith

"Stylin' with CSS: A Designer's Guide 2nd Edition"


For these two reasons, I advise you to set all font sizes in ems rather than in
absolute units, such as pixels. If you are designing a row of tabs in a ?¬? xed
horizontal space, the layout has the potential to break if the text gets resized.
If you??™re careful, however, and design with this possibility in mind, you can
develop such components of your design so that they can accommodate
larger type when the size is changed by the user.
HOW CSS WORKS 63
Color Values
You can use several value types to specify color. Use whichever one
of the following you prefer.
Hexadecimal (#RRGGBB and #RGB). If you already know languages
like C++, PHP, or JavaScript, then you are familiar with hexadecimal
(hex) notation for color. The format is this
#RRGGBB
In this six-character value, the ?¬? rst two characters de?¬? ne red, the
next two green, and the next two blue. Computers use units of two
to count, rather than base 10 like us mortals, and that??™s why hex is
base 16 (2 to the power of 4), using the 16 numbers/letters 0??“9 and
A??“F. A thru F effectively function as 10 through 15. Because color is
represented by a pair of these base 16 numbers, there are 256 (16 ?—
16) possible values for each color, or 16,777,216 combinations (256
?— 256 ?— 256) of colors. You de?¬? nitely get the most color options by
using hexadecimal, although you can get by with far less.


Pages:
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102