Link to home
Start Free TrialLog in
Avatar of rschaeferhig
rschaeferhigFlag for United States of America

asked on

How to float an image aligned with the bottom of a varying height table?

I have a web page where the content is displayed in a table. The content will vary so the height of the table may vary. The customer wants an image to be floated behind the table, which I figured out, but they want the bottom of the image aligned with the bottom of the table.

Here's what I have:
<Table style="z-index:2; position:absolute; left: 0px; top: 0px;">
      table content here
</table>
<IMG src=source url style="vertical-align:bottom; z-index:1; position:absolute; left: 0px; top: 0px;">
This doesn't work.

I assume I need to do something with FLOAT but I'm not a CSS guy so I could be way off.

Any help would be greatly appreciated.
Avatar of sayguh
sayguh

How about this?

<Table>
<tr><td style="background-image:url(images/blah.jpg); background: no-repeat bottom center;">
 table content here
</td></tr>
</table>

Avatar of rschaeferhig

ASKER

We're trying to eliminate background images in favor of IMG tags. The HTML is used as the body of an email and we want all the images embedded in the email, not linked to the web server. I'm not sure you can specify a CID as the source for a TD Background, and even if you can CreateMHTMLBody isn't smart enough to find Background images.
 
Ahh - I don't think you will be able do it that way if the size of the table is going to vary.
ASKER CERTIFIED SOLUTION
Avatar of rschaeferhig
rschaeferhig
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial