CSS2 Properties - Lists
A D V E R T I S E M E N T
List properties
All list properties are inherited, and thus if applied to OL will inherit to
list items inside that OL. However, properties applied to BODY will be
overridden by the browser style sheet, since browser style sheets have OL
{list-style: decimal} and UL {list-style: disc}.
Specifying style on OL and UL is to be preferred to specifying properties on
OL LI, since, for example, OL.class LI {x: y} would override UL LI {x: z} in <OL
class="class"> <UL> <LI> </UL> </OL> because it has greater specificity.
IE 3 does not support list style properties.
List-style-typeThe values are:
-
disc (colored-in circle - the initial value)
-
circle (hollow circle)
-
square
-
decimal (1, 2, 3)
-
decimal-leading-zero (01, 02, 03 ... 0100)
-
lower-roman (i, ii)
-
upper-roman (I, II)
-
lower-alpha (a, b, c)
-
upper-alpha (A, B, C)
-
none
-
lower-latin (a, b, c)
-
upper-latin (A, B, C)
-
lower-greek (α, β, γ)
- upper-greek (Α, Β, Γ)
-
armenian
-
georgian
-
cjk-ideographic
-
hiragana
-
hiragana-iroha
-
katakana
-
katakana-iroha
-
georgian
For example OL {list-style-type: lower-alpha}
The initial value for list-style-type is disc.
List-style-positionThis can be inside or outside (initial value). For example, OL
{list-style-position: inside}.
Outside:
1 List item
second line of list item
Inside:
1 List item
second line of list item
List-style-imageThis specifies that an image should be used instead of a list style type. It
follows this syntax: list-style-image: url(li.gif). Alternatively
none can be specified, which is the initial value. For example, P
{list-style-image: url(li.gif)}
List-styleThis is a shorthand for one or more of the above. For example, LI
{list-style: outside lower-alpha}
|