Section A.3. List Properties


A.3. List Properties

The following properties affect the formatting of bulleted lists (<ul>) and numbered lists (<ol>).

A.3.1. list-style (inherited)

This property is a shorthand method of specifying the three properties listed next . You can include a value for one or more of those properties, separating each by a space. You can even use this property as a shortcut for writing a single property and save a couple of keystrokes: list-style: outside , instead of list-style-position: outside . If you specify both a type and an image, a Web browser will display the bullet type (disc, square, and so on) only if it can't find the image. This way, if the path to your custom bullet image doesn't work, you don't end up with a bulletless bulleted list.

  • Values : Any valid value for list-style-type, list-style-image , and/or list-style-position .

  • Example : list-style: disc url(/books/2/835/1/html/2/images/bullet.gif) inside ;

A.3.2. list-style-image (inherited)

Specifies an image to use for a bullet in a bulleted list.

  • Values : an URL value (Section A.1.1) or none .

  • Example : list-style-image: url(images/bullet.gif );


Tip: The background-image property does the custom bullet job just as well and offers more control (see Section 8.2).

A.3.3. list-style-position (inherited)

Positions the bullets or numbers in a list. These markers can appear outside of the text, hanging off to the left, or inside the text (exactly where the first letter of the first line normally begins). The outside position is how Web browsers normally display bullets and numbers.

  • Values : inside, outside

  • Example : list-style: inside ;

A.3.4. list-style-type (inherited)

Sets the type of bullet for a listround, square, roman numeral, and so on. You can theoretically turn an unordered (bulleted) list into an ordered (numbered) list by changing the list-style-type property, but it doesn't work in all browsers (including Internet Explorer for Windows). Use the none option to completely remove bullets or numbers from the list.

  • Values : disc, circle, square, decimal, decimal-leading-zero, upper-alpha, lower-alpha, upper-roman, lower-roman, lower-greek, none

  • Example : list-style-type: square ;



CSS[c] The Missing Manual
Dreamweaver CS3: The Missing Manual
ISBN: 0596510438
EAN: 2147483647
Year: 2007
Pages: 154

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net