Outlook HTML Signature in GMail App: Gap between <td> Elements

Viewed 1302

I am facing a strange behavior of the GMail App on Android when displaying an HTML Signature created with Outlook 2017 from Mac OS.

First of all, here is what I did:

  1. I created an HTML signature with a simple table layout and opened in a Browser
  2. I copied the content from the Browser Window into the Signature Panel in Outlook (Outlook -> Settings -> Signature)
  3. I kept the original formatting after pasting the content

Now the Signature basically looks fine in the Browser, Outlook on Mac and in the iPhone standard Mail App. In Gmail on Android there are very large gaps between the table rows and I cannot find any way to control them. Of course I dod some research and ended up with recommendations discussed here and here amongst many other sources. The formatting issues have been adressed in Google Forums. Some People were able to break it down to a specific CSS class MsoNormal added by Outlook, however they are all quite old and the suggestions do not seem to work out for me. I have tried a lot of stuff and ended up with three different versions all with the same or similar results.

The first version uses divs inside the table to structure the text:

<table style='font-family:Arial; cellspacing:0px; cellpadding:0px; padding:0px; margin:0px; border-spacing: 0; line-height:60%;'>
  <tbody>
    <tr>
      <td>
        <img src='http://361nutrition.de/signature/img/dummy.jpg' alt='line' style='width:85px; height:130px; display:block; vertical-align:text-top; line-height:0;' />
      </td>
      <td style='width:5px'></td>
      <td style='vertical-align:top;'>
        <div style='font-size: 11px; margin:0px; padding:0px;'>
          Peter Pan<br>
          Chief Executive Officer<br>
          <b>The Company</b>
        </div>
        <div style='font-size: 9px; margin:0px; padding:0px;'>
          Reach me at:<br>
          peter@thecompany.com<br>
          +00 324 244 20
        </div>
        <div style='font-size: 9px; margin:0px; padding:0px;'>
          ...or visit me at:<br>
          My Office<br>
          Office Street Nr.<br>
          44556 Officetown
        </div>
      </td>
    </tr>

  </tbody>
</table>

The second uses a table within the table:

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<style type="text/css">
        p.MsoNormal {
            margin: 0px !important;
        }
</style>
</head>
<body>
<table  class='tbl' style='min-width:300px; font-family:Arial; cellspacing:0px; cellpadding:0px; padding:0px; margin:0px; border-spacing: 0; line-height:60%;'>
  <tbody class='tbl_body'>
    <tr class='tbl_tr' style="display: block; white-space: nowrap;">
      <td class='tbl_td' style="line-height:0; display: inline-block;"><img src='http://361nutrition.de/signature/img/dummy.jpg' alt='line' style='width:85px; height:130px; display:block; vertical-align:text-top' /></td>
      <!--<td style='width:5px; display: inline-block;'></td>-->
      <td class='tbl_td' style='vertical-align:top; display: inline-block;'>
        <table class='tbl' style='font-family:Arial; cellspacing:0px; cellpadding:0px; padding:0px; margin:0px; border-spacing: 0; line-height:60%;'>
          <tbody class='tbl_body'>
            <tr class='tbl_tr' style='font-size: 11px; margin:0px; padding:0px; display: block; white-space: nowrap;'>
              <td class='tbl_td' style="display: inline-block;">Peter Pan<br>Chief Executive Officer<br><b>The Company</b></td>
            </tr>
            <tr class='tbl_tr' style='font-size: 11px; margin:0px; padding:0px; display: block; white-space: nowrap; '>
                <td class='tbl_td' style="display: inline-block;">Reach me at:<br>peter@thecompany.com<br>+00 324 244 20</td>
            </tr>
            <tr class='tbl_tr' style='font-size: 11px; margin:0px; padding:0px; display: block; white-space: nowrap;'>
              <td class='tbl_td' style="display: inline-block;">...or visit me at:<br>My Office<br>Office Street Nr.<br>44556 Officetown</td>
            </tr>
          </tbody>
        </table>
      </td>
    </tr>

  </tbody>
</table>
</body>
</html>

And finally I used a 3 x 2 table layout with the image spanning 3 rows:

<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <style type="text/css">
          p.MsoNormal {
              margin: 0px !important;
          }
  </style>
</head>
<body>
  <table style='font-family:Arial; cellspacing:0; cellpadding:0; border:0; border-collapse: collapse; padding:0px; margin:0px; border-spacing: 0; line-height:60%;'>
    <tbody>
      <tr style='margin:0px; padding:0px;'>
        <td rowspan="3" style='line-height:0'>
          <img src='http://361nutrition.de/signature/img/dummy.jpg' alt='line' style='width:85px; height:130px; display:block; vertical-align:text-top' />
        </td>
        <td style='font-size: 11px; margin:0px; padding:0px;'>Peter Pan<br>Chief Executive Officer<br><b>The Company</b></td>
      </tr>
      <tr style='margin:0px; padding:0px;'>
        <td style='font-size: 11px; margin:0px; padding:0px;'>Reach me at:<br>peter@thecompany.com<br>+00 324 244 20</td>
      </tr>
      <tr style='margin:0px; padding:0px;'>
        <td style='font-size: 11px; margin:0px; padding:0px;'>...or visit me at:<br>My Office<br>Office Street Nr.<br>44556 Officetown</td>
      </tr>
    </tbody>
  </table>
</body>

In GMail the results for the table approaches look somewhat like this:

Table Layout

And the div approach somewhat like this:

Div Layout

As you can see there are large gaps between the text boxes, although there is no margin, padding, cellspacing or whatsoever.

I have fiddled around with CSS a lot and didn't come up with any solution.

I hope someone can help.

Regards, Markus

1 Answers

First of all, did you try to use <meta name="viewport" content="width=device-width" /> in your head section ?

Then, did you also try to reduce the line-height of your <td>, or wrap all your informations in one <td> markup, and put some <br> break in it ?

Hope it's help.

Chaaampy.

Related