For ordered lists, this defaults to decimal (resulting in a numbered
list), but a number of other values are available, including lower-roman (i, ii, iii, etc.)
and upper-alpha (A, B, C, etc.) A full list of supported values is in Appendix D (CSS
Reference).
Generally speaking, the values noted are the best supported, along with the upper and
lower versions of roman and alpha for ordered lists. If a browser doesn??™t understand the
numbering system used for an ordered list, it usually defaults to decimal. The W3C recommends
using decimal whenever possible, because it makes web pages easier to navigate.
I agree??”things like alpha and roman are too esoteric for general use, plus there??™s
nothing in the CSS specifications to tell a browser what to do in an alphabetic system after
z is reached (although most browsers are consistent in going on to aa, ab, ac, etc.).
THE ESSENTIAL GUIDE TO CSS AND HTML WEB DESIGN
110
List style shorthand
As elsewhere in CSS, there is a shorthand property for list styles, and this is the aptly
named list-style property. An example of its use is shown in the following piece of CSS:
ul {
list-style-type: square;
list-style-position: inside;
list-style-image: url(bullet.gif);
}
which can be rewritten as follows:
ul {
list-style: square inside url(bullet.gif);
}
List margins and padding
Browsers don??™t seem to be able to agree on how much padding and margin to place
around lists by default, and also how margin and padding settings affect lists in general.
Pages:
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188