0

I have a little problem with Gmail email template. It happens only in Gmail app, I want a full width email template, but on right side, margin is a bit bigger than left. I know, there is some padding from screen sides in app, but that right side, doesn't looks good. There is screenshot enter image description here

And there is my HTML code

      <div style="width: 100%!important;background: #E4E2E5;background:-webkit-linear-gradient(bottom, #fff 15%, #E4E2E5);background: linear-gradient(to top, #fff 15%, #E4E2E5);padding: 60px 0 0 0;margin: 0 0 200px 0;">
  <style>
        @import url('https://fonts.googleapis.com/css?family=Roboto:300,400');
        .container{width: 100%;max-width: 850px;}
        </style>
    <table style="font-family:'Roboto';background:white;" class="container">
        <tbody>
            <tr>
                Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent euismod consectetur pulvinar. Vivamus laoreet semper ante, quis iaculis dui fermentum vel. Integer at efficitur nibh. Morbi tempor convallis mauris, et cursus eros volutpat vitae. Nulla sodales nunc sit amet porttitor sollicitudin. Integer hendrerit, lectus vel sagittis elementum, leo nisi condimentum urna, ut tincidunt mauris augue sit amet leo. Sed a ultricies risus. Nam non condimentum est. Aliquam erat volutpat. Etiam placerat velit sit amet sagittis mattis. Cras blandit venenatis venenatis.
            </tr>
        </tbody>
    </table>
  </div>
eatmailyo
  • 670
  • 1
  • 12
  • 33
  • Try to avoid divs / classes. In this case you should just put the style of the div in your table. I'm not sure how your problem occurs. The reason could be that you're using a class. Just put the styles in the table style="". Could you try this and let us know? Then I'll give it a try myself if I find some time today. – JeroenE Dec 30 '16 at 11:38
  • @JeroenE still the same problem :( – eatmailyo Dec 30 '16 at 11:41
  • 1
    let the tr content be like `

    content here

    `
    – StackUseR Dec 30 '16 at 11:41
  • @AshishSrivastava still not the solution – eatmailyo Dec 30 '16 at 11:42
  • 1
    @DanielsJirgensons But you still should change that (what Ashish said). Bad syntax the way you've written your code right now. – JeroenE Dec 30 '16 at 11:43
  • Do you have negative values for padding? Gmail ignores margin and padding properties if they have a negative value. Also hope [this](https://litmus.com/community/discussions/1281-100-width-sections-don-t-work-properly-in-gmail-app) is helpful for you.:) – StackUseR Dec 30 '16 at 11:50
  • @JeroenE I edited like this, but still, without changes – eatmailyo Dec 30 '16 at 11:56
  • @AshishSrivastava do you see any negative values!? – eatmailyo Dec 30 '16 at 11:56
  • I maybe found your answer on Stack: http://stackoverflow.com/questions/25630139/100-width-tables-dont-work-in-gmail-android . Force the width (!important) to set it to 100%. Make sure to do this in-line! So: style="width:100%!important;" – JeroenE Dec 30 '16 at 12:47

0 Answers0