The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS List style image using sprites? Reply To: List style image using sprites?


Well if you are not using another background image for your li, I would assign the LI some left-padding and place the bg image for those. For example:
<br />
<!-- HTML: --><br />
<ul><br />
<li class="li_2">List Item</li><br />
</ul><br />
<!-- CSS: --><br />
.li_2 {<br />
list-style-type:none;<br />
margin:0;<br />
padding:0 0 0 20px;<br />
background: transparent url('[image/url]') no-repeat 0 -15px;<br />
}<br />
<br />

This is just an example of course but I know it works.