Use :before
pseudo here.. Now the issue with your solution is when you use sprites, you need an element to have fixed dimensions, using background-size
will resize entire image, and NOT a particular part of the image.
So here, I create a virtual element using CSS :before
pseudo, am assigning some fixed dimensions to that, also make sure that if you aren't using position: absolute;
than make sure you declare display: inline-block;
as :before
pseudo generated content is inline by default.
li:before {
content: "";
position: absolute;
left: 0;
height: 16px;
width: 16px;
top: 1px;
background-image: /* Your base_64 junk */
}
Demo 2 (Hover the last li
for an active bullet state)