SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Addict
    Join Date
    Jun 2005
    Posts
    312
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    xhtml email signature not rendering correctly in Windows Live Hotmail

    Hi everyone,

    I've created an html email signature using basic tables and inline css. In order to get it to work, I open up the html file in Word, then copy everything to the clipboard, then paste it into the signature box in Outlook 2007. When I create a new message, the signature automatically appears and I just type in the email above it.

    The signature works fine when tested in most email programs in that the signature itself displays correctly and the paragraphs I type above the signature all appear fine also. The problem is that when I test in Windows Live Hotmail, again the signature part is fine but the paragraphs, constituting the body of the email, all have a large amount of space below each paragraph. I don't know why this is happening only in Hotmail and wondered if someone could tell me what might be going on?

    The following is the code that I used for the signature. The thing is that this code is only creating/formatting the signature part so I don't know whether I need to add extra code to format the body of the email in order to get it to work consistently across email clients. If so, I don't know how to do this but would really appreciate any help.

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html>
    <head>
    <title>Untitled</title>
    <meta http-equiv="Content-Type" content="text/html;">
    </head>
    <body bgcolor="#ffffff" style="margin:0; padding:0;">
    <!-- Start Table -->
    <table width="558" height="100%" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="padding: 0; margin: 0;">
    <tr>
    <!-- Start Content -->
    <td align="left" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 15px;  color:#000; padding-bottom: 15px; margin: 0;"><p style="padding-bottom: 20px;">Yours sincerely,</p>
      <p style="color: #000; margin: 0; padding: 0; font-weight:bold">Firstname Lastname</p></td>
    <!-- End Content -->
    ******</tr>
    ******
    <tr>
    <!-- Start Footer -->
    ****** *****
    <td valign="top" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; line-height: 19px; text-align:left; color:#666666;"><p style="margin-bottom: 5px; padding: 0;"><img src="kcLogo.jpg" alt="logo" width="187" height="35" style="" /></p>
          <p style="margin: 0; padding: 0;">Number Street Suburb State Postcode</p>
          <p style="margin: 0; padding: 0;"><span style="color: #000; font-weight:bold">tel: </span>+61 2 9513 0000 <span style="color: #e5ae51; font-weight:bold">&nbsp;|&nbsp;</span> <span style="color: #000; font-weight:bold">fax:</span> +61 2 9513 0003 </p>
          <p style="margin: 0; padding: 0;"><span style="color: #000; font-weight:bold">email:</span> emailaddress <span style="color: #e5ae51; font-weight:bold">&nbsp;|&nbsp;</span> 
        <a href="http://www.webaddress.com" style="color: #666666; text-decoration: none;">www.webaddress.com</a></p></td>
    ****** ******* *
    <!-- End Footer -->
    ******</tr>
    </table>
    </body>
    </html>

  2. #2
    SitePoint Evangelist Karpie's Avatar
    Join Date
    Jul 2007
    Location
    Perth, Australia
    Posts
    445
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hotmail ignores margin on all elements. Thus, even though you've stripped the margin off your paragraphs, Hotmail will apply whatever the default margin is (12px approximately?) to them.

    While it's unsemantic, the best thing to do in this case is use one paragraph for the lot, with <br> tags in between the lines.

  3. #3
    SitePoint Addict
    Join Date
    Jun 2005
    Posts
    312
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the reply,

    Quote Originally Posted by Karpie View Post
    While it's unsemantic, the best thing to do in this case is use one paragraph for the lot, with <br> tags in between the lines.
    How do I do this? I mean the code I used for the signature inserts the signature info at the bottom of a new message and then I type above that using the settings in Outlook 2007. Is there a way to code/style the part of the email above the signature?

  4. #4
    SitePoint Enthusiast cssiscool's Avatar
    Join Date
    Feb 2006
    Location
    East Moline, Illinois
    Posts
    87
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't understand why you are using a dtd in an email signature in hotmail? this is just email and it would be the only part of the page that validated. i'd just leave it out.

  5. #5
    SitePoint Evangelist Karpie's Avatar
    Join Date
    Jul 2007
    Location
    Perth, Australia
    Posts
    445
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I meant one paragraph for the contents of the signature, instead of different paragraphs for your name, telephone, etc. My bad.

  6. #6
    SitePoint Addict
    Join Date
    Jun 2005
    Posts
    312
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    But it's not the contents of the signature that's causing the problem - the signature renders fine - even in hotmail. It's the body of the email itself that's causing the problem. That's why I asked if it's possible to code/style this section of the email so that the paragraphs will render without the extra space in hotmail also.

    Can someone help here?

  7. #7
    SitePoint Evangelist Karpie's Avatar
    Join Date
    Jul 2007
    Location
    Perth, Australia
    Posts
    445
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Then why on earth is your topic title, and all of the topic post except one line, about the signature, if the signature isn't the problem -_-

  8. #8
    SitePoint Addict
    Join Date
    Jun 2005
    Posts
    312
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Karpie View Post
    Then why on earth is your topic title, and all of the topic post except one line, about the signature, if the signature isn't the problem -_-
    Because the signature is part of the email and I thought that to solve the problem in the body of the email, the solution may involve revising the signature code.


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
  •