Friday, 6 September 2013

Putting a span with an image before the text of a list item

Putting a span with an image before the text of a list item

I have an HTML structure that looks like this:
<li class="thing"><a href="#" class="my-link">Something</a></li>
My goal is to put a span that looks like this in front of the link tag:
<span class="my-span"></span>
What's the best way to go about doing this? Is it a CSS :before or a
jQuery/Zepto .before method? Also, proper syntax as to how to do this
would be helpful. I've been struggling with this.
Thanks!

No comments:

Post a Comment