list-style-image
property:
ul { list-style-image: url('lamp.gif'); }The example above does not display equally in all browsers. IE and Opera will display the image-marker a little bit higher than Firefox, Chrome, and Safari. If you want the image-marker to be placed equally in all browsers, a crossbrowser solution is explained below.
ul { list-style-type: none; padding: 0px; margin: 0px; } li { background-image: url(lamp.gif); background-repeat: no-repeat; background-position: 0px 5px; padding-left: 14px; }
ul
:
list-style-type
to none to remove the list item marker andpadding
and margin
to 0px (for cross-browser compatibility).li
:
no-repeat
),padding-left
.
Life always offers you a second chance. It’s called tomorrow. |