Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 264
  • Last Modified:

HTML in email. Trying to control DIV email

I've developed a simple page for a mass emailing and I'm trying to control the width of a DIV element when the page is viewed in Outlook.  Here's the page:


I've followed the suggestions found here: http://blogs.sitepoint.com/code-html-email-newsletters/
1. I'm using a table for layout.
2. My CSS is all inline.

The parent DIV, unfortunately, is giving me trouble.  When I send the page, it vanishes completely.  Image 1 shows the DIV border on the page.  Image 2 shows the missing border after the email has been sent.  

Suggestions?  Should I wrap the enter <table> element in a parent <table> <td> combo instead of a parent <div>?
1 Solution
For HTML e-mail, you want to keep the HTML as simple and dummed-down as possible. Many e-mail clients simply don't support the latest and greatest. That means lots of tables instead of divs. It's not great code for a web browser, but it's the best bet for HTML e-mail.

So, yes, wrap the existing table inside of another table instead of using a DIV and it should work well.
jdanaAuthor Commented:
The wrapper table did the trick.  Configuring HTML / CSS for email is so weird!

Featured Post

NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now