kizoso
kizoso

Reputation: 1246

How do I prevent mail width compressing in the gmail?

I have a mail with fixed width. But gmail compresses it. How to prevent the compression?

<table bgcolor="#F3F3F3"
       style="Margin:0;margin:0;padding: 0;font-family:'Arial',sans-serif;max-width:100%;padding:0;width:100%;background:#F3F3F3;">
  <style>
    a{
      text-decoration: none;
      color: inherit;
      color: inherit !important;
    }
    @media print{
      body, html{
        -webkit-print-color-adjust: exact;
      }
    }
  </style>
  <tbody>
  <tr>
    <td>
      <center>
        <table width="600" bgcolor="#6999CC"
               style="Margin:0 auto;margin:0 auto;max-width:100%;width:600px;background:#6999cc;">
          <tbody bgcolor="#6999CC" style="background: #6999CC">
          <tr bgcolor="#6999CC" style="background: #6999CC">
            <td bgcolor="#6999CC" style="background: #6999CC">
              <center bgcolor="#6999CC" style="background: #6999CC">
                <table>
                  <tbody>
                  <tr>
                    <td height="4" style="height: 4px;line-height: 4px;">&nbsp;</td>
                  </tr>
                  </tbody>
                </table>
                <!--spacer-->

                <table cellpadding="0" cellspacing="0" border="0" width="570" ...

In other apps I have no this problem. I have tried to fix all layers, wrapper should be 100% width. Is there any trick to make gmail to understand the width?

If I have several letters gmail makes "conversation", and all content makes as quotes. And after it every quote layout brakes!!! Even if it was ok earlier.Because gmail cuts half of styles using this "great" function!

Upvotes: 1

Views: 684

Answers (1)

kizoso
kizoso

Reputation: 1246

This problem is because of increasing font-size in the app. To prevent increasing I have add this line in the end:

<div style="white-space:nowrap!important;line-height: 0; color: #ffffff;">
- - - - - - - - - - - - - - - - - - - - - - - -  - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
</div>

Upvotes: 1

Related Questions