I have some links in a list, and I'd like a graphic to appear next to each of them (but to the right), and have the graphic included in the link. So basically: <ul> <li><a href="#">item 1<img src="buyitem1.jpg" style="float:right"></a></li> <li><a href="#">item 2<img src="buyitem2.jpg" style="float:right"></a></li> (and so on) This hasn't worked out so far. I have tried style="text-align:right", align="right", etc. Any idea what I'm doing wrong. The list is in a div with a width of about 400px, and I'd like for the images to appear flush up against the right hand side.
Think about it. You want the image to be flush with the right hand side... of the li, right? But you've got it inside the anchor. Since your anchor doesn't have anything suggesting you've made it a block or anything, it's only as wide as the text and the image is, no wider. Certainly not wide enough to reach the right side! Have you considered making the image a sibling of the anchor instead of a child? <li><a href="#">item</a><img src="blah"></li>? Although, I haven't ever seen a menu that really needed an HTML img in it before... instead, it's usually decorational, meaning it belongs in the css. Like this: <li><a href="#">blah</a></li> li { background: url(tehimage.bla) 100% 50% no-repeat; } That's pseudo-CSS, it needs to be written properly to go with your page, but I'd say you might really be after this instead of a hard image tag.