Sams Teach Yourself HTML, CSS & JavaScript Web Publishing in One Hour a Day

(singke) #1
ptg16476052

Workshop 87

5


TABLE 5.3 CSS Properties from Lesson 5


Property Use/Values


list-style-type Used to specify the bullet style or numbering style for the list. Valid
values are disc, circle, square, decimal, lower-roman, upper-
roman, lower-alpha, upper-alpha, and none.


list-style-image The image to use in place of the bullets for a list. The value should
be the URL of the image.


list-style-positionDefines the alignment of lines of text in list items after the first.
Values are inside and outside.


list-style Enables you to set multiple list properties at once: list style type,
list style position, and the URL of the bullet style.


Workshop


You’ve learned how to create and customize lists in HTML. In this section, you’ll see
the answers to some common questions about lists, as well as some exercises that should
help you remember the things you’ve learned.


Q&A


Q My glossaries came out formatted really strangely! The terms are indented
farther in than the definitions!


A Did you mix up the

and
tags? The
tag is always used first (the defi-
nition term), and the
follows (the definition description). I mix them up all the
time. There are too many d tags in definition lists.


Q Is it possible to change the amount that list items are indented, or remove the
indentation entirely?


A Yes, the properties used to control list indentation are margin-left and padding-
left. Some browsers use one and some use the other, so you need to set both of
them to change the indentation for your lists. You might need to use negative mar-
gins to get the text to line up the way you want.

Free download pdf