I want to use three different images instead of bullets to create a lisli>t
Example:
<ul>
<li>The dog is big</li>
<li>The dog is small</li>
<li>The dog is medium sized</li>
</ul>
So instead of bullets before each of the above phrases there would be a different image before each.
Live Demo
This makes use of the CSS property list-style-image
.
ul {
margin: 0 0 0 32px;
line-height: 1.5
}
.b1 {
list-style-image: url(http://upload.wikimedia.org/wikipedia/commons/1/19/Icons-mini-icon_attachment.gif);
}
.b2 {
list-style-image: url(http://upload.wikimedia.org/wikipedia/commons/6/61/Icons-mini-icon_security.gif);
}
.b3 {
list-style-image: url(http://upload.wikimedia.org/wikipedia/commons/a/ab/Icons-mini-icon_clock.gif);
}
<ul>
<li class="b1">The dog is big</li>
<li class="b2">The dog is small</li>
<li class="b3">The dog is medium sized</li>
</ul>
Use list-style-image: url(imagename); to replace the bullets entirely with images. The downside of this method is that each browsers positions the images differently. CSS background images for list bullets is a more consistent method.
from http://css.maxdesign.com.au/listamatic/vertical04.htm
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With