Zac Zac - 1 year ago 108
CSS Question

Insert image after each list item

What would be the best way to insert a small image after each list element? I tried it with a pseudo class but something is not right...

ul li a:after {display: block;
width: 3px;
height: 5px;
background: url ('../images/small_triangle.png') transparent no-repeat;}

Thanks for any help!

Answer Source

The easier way to do it is just:

ul li:after {
    content: url('../images/small_triangle.png');
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download