Документация
HTML CSS PHP PERL другое
Recipe 4.7 Moving the Marker Inside the List
 
Previous Page Table of Contents Next Page

Recipe 4.7 Moving the Marker Inside the List

Problem

You want the list marker to be pulled inside the border of the list items, as in Figure 4-8. This creates an effect in which the text wraps around the marker.

Figure 4-8. Moving the marker inside the list item
figs/csscb_0408.gif


Solution

Use the list-style-position property and set the value to inside:


Discussion

keep the marker inside, for example, to eliminate the need to have enough whitespace on the left side. Also, replacing the list marker with your own custom marker can visually enhance this recipe. For example, Figure 4-9 shows arrows rather than the default bullet.

Figure 4-9. Custom marker inside the list item
figs/csscb_0409.gif


See Also

The CSS 2.1 specification for list-style-position at http://www.w3.org/TR/CSS21/generate.html#propdef-list-style-position.

    Previous Page Table of Contents Next Page


     Приглашаем посетить сайты 
    Мода Чехов Крылов Автомобили Грибы Женщинам Фонвизин Херасков Толстой А.Н. CSS