Eden 0


I've a TD that contains an Image. How can I position the image at the bottom right corner (using CSS 2.1)



2 answers

o.k.w 2355

One methos I used in one of the posts here, which set the style's position of the container to 'relative', then set the image's to 'absolute' with right and bottom values = 0.

td.container {
  position: relative;
  position: absolute;
  bottom: 0;
  right: 0;
Answered over 9 years ago by o.k.w
  • It seems that Firefox doesn't support "position: relative;" on <TD> (while IE does). So I had to place the content inside of a <DIV>. Seems to work. Thanks. Eden over 9 years ago
  • @Eden: I've not tried it on TD actually, now I know. Thanks too! o.k.w over 9 years ago
danwellman 5600

As it's a <td> element you should be able to use vertical-align:bottom; text-align:right on the <td>

Or you could use the align="right" attribute on the image itself if text-align doesn't work, although this isn't CSS...

If the image is a background image you should be able to use background-position:100% 100%; for it to line up in the bottom right

Answered over 9 years ago by danwellman