SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Dec 2008
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Aligning text in web based email clients

    I have been building sites and emails for a number of years. No Rembrandt but OK.

    This is embarrassing but I have invested about 8 hours in trying to align text left (yes really) in HTML emails sent to my test GMAIL, LIVE and YAHOO accounts. All text is centered! Like my worst nightmare. This only occurs when viewing these emails clients using IE7. I thought it was ONLY my IE7 but a couple of other tests proved it was a real issue.

    All I am trying to do is center a table but left justify the text within that table. Unreal. Any use of the word center in the HTML to center the table affects the text.

    I've tried <DIV ALIGN="CENTER"><center> tags, <p> tags. Every single table cell is ALIGN="LEFT". I've tried using margins "auto" on the table (for Mozilla) and text-align center in the body for IE. I've tried in line styles, head tag styles ... you name it.

    I've tried various DOCTYPES. I've tried changing the charset. I mean it's ridiculous.

    The ONLY WAY I can left justify text viewing any of the web email clients in IE7 is to leave the table left aligned.

    Any suggestions will be sincerely appreciated.

  2. #2
    SitePoint Enthusiast
    Join Date
    Sep 2006
    Posts
    76
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I haven't done many emails but what if you wrap the entire table in another table with width="100&#37;" and align="center" and then leave the inner table with align="left"?

    Just a thought. I hate coding email templates.

  3. #3
    SitePoint Member
    Join Date
    Dec 2008
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Brad...

    Would you believe that's exactly what I did. No matter how I have attempted to center the table it centers the text. These emails "download" perfectly. They are even aligned perfectly in that piece of crap Outlook 2007. It's all the web based clients using IE. Viewing the emails in the web clients using Firefox the text is correctly aligned.

  4. #4
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,688
    Mentioned
    100 Post(s)
    Tagged
    4 Thread(s)
    You may find some answers at http://www.email-standards.org/
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •