Moving on to lists, you'll begin by styling an ordered list. You'll modify the marker type and then replace the marker altogether with an image. I began with some text and background styles along with an unstyled ordered list, resulting in Figure 10-9.
If you want to use an alternate marker, you can do so using the list-style-type property with a corresponding value. There are numerous values (most supporting numerals in other languages), but the ones you'll likely want to swap in an ordered list are decimal-leading-zero (which starts the numbering at zero) and lower-roman or upper-roman (which use lower or upper Roman numerals, respectively). Simply add the value you want to the existing style sheet:
ol {list-style-type: lower-roman;}
This results in the numerals displaying in lowercase Roman (see Figure 10-10).
If you'd like to replace the numerals with an image, create images for each number you require and apply classes to each list item to get the results (see Example 10-6).
<!DOCTYP176 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/l1/DTD/l1-transitional.dtd"> &l191 xmlns="http://www.w3.org/1999/l"> <head> <title>working with style</title> <style type="text/css"> body {font: 14px Georgia, Times, serif; color: black; background-image: url(balloons.gif);background-position: right top; background-repeat: no-repeat;} h1 {font: 22px Arial, Helvetica, sans-serif; color: orange; text-decoration: underline; text-transform: capitalize;} h2 {font: italic 20px Georgia, Times, serif; color: red; text-transform: lowercase;} .list1 {list-style-image: url(1.gif);}
.list2 {list-style-image: url(2.gif);}
.list3 {list-style-image: url(3.gif);} </style> </head> <body> <h1>Directions to the Party!</h1> <ol>
<li> From the corner of Broadway and 5th Avenue, take a right onto 5th.</li>
<li> Follow 5th North about three miles until you come to the Oak Road
intersection.</li> <li> Take a right on Oak Road. Stay on Oak about five miles.</li> </ol> </body> <l>
You can see not only the relevant CSS here, but also see the rules I created for the rest of the page styles (see Figure 10-11).