Grow your CSS skills. Land your dream job.

[Solved] HTML Email Table Width

  • # June 16, 2009 at 5:01 pm

    I’ve been struggling getting a table to behave for an html email (which will end up with inline css). I’d like one table above the footer to be centered and stretch 466px wide, but it keeps pushing further out. I appreciate any help.

    Here’s a live example: http://www.lookoutcreative.com/OEC/fork/

    And here’s the code for this section:

    Code:

    Digging for more?

    Question: In facilisis ante ut justo vestibulum eu laoreet enim posuere?

    Answer: Curabitur sed arcu augue, eu fermentum risus. Proin at sapien id mauris pulvinar eleifend ac vel felis. Fusce sagittis odio nec turpis ornare pellentesque. Ut a turpis purus.

    Got a question? Click here to ask us.

    Join OEC today!

    Suspendisse eleifend, felis vitae adipiscing mattis, elit elit posuere elit, eu posuere massa quam vitae nibh. Donec tincidunt magna sed urna bibendum id ullamcorper tortor dignissim. Vivamus consequat massa eu eros convallis luctus. Donec et elit diam.

    join-btn

    Also here’s what I’d like it look like:

    [img]http://www.lookoutcreative.com/OEC/fork/images/box.jpg[/img]

    # June 16, 2009 at 6:37 pm

    You have the background color applied to the <td> BEFORE the <table>, that’s why it doesn’t appear to be getting any smaller.

    Code:

    You need to have the background property of "sub-content" apply to the TABLE, not the <td> before it. So, remove the background property from "sub-content" and paste it into the <table>:

    <table width="466" style="background: #855525;" cellpadding="0" border="0" align="center">

    # June 17, 2009 at 11:09 am

    Perfect, thanks for your help!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".