2 replies [Last post]
aluminumpork
Offline
newbie
Last seen: 14 years 50 weeks ago
Joined: 2004-07-22
Posts: 5
Points: 0

I'm looking for the best way to position a small image (such as a download image) next to links in an unordered list.

  • List Item #1
  • List Item #2
  • List Item #2

Doing that, the images won't line up correctly. Is there a better way to do this, so that I can actually position the images?

Thanks.

Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 7 years 14 weeks ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

Make it a background-image

Make it a background-image instead and apply to the anchor (you'll need to give the anchor some left or right padding to make room for the image). You can then use background-position to line it up correctly.

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference

aluminumpork
Offline
newbie
Last seen: 14 years 50 weeks ago
Joined: 2004-07-22
Posts: 5
Points: 0

Thanks! Works like a charm!

Thanks! Works like a charm!