Force Inbox by Gmail to render desktop version?

我的未来我决定 提交于 2019-12-13 19:06:54

问题


I am working on a email/html template for a customer which we would like to render as good as possible and on as many clients as possible.

My initial problem was that Gmail App was rendering the mobile version and I spent some hours to try to fix the many issues but in the end I placed a hidden td with a minimum width of 610px to force Gmail App to render the desktop version. I know that was a quick fix but I found it too time consuming to try to fix the many issues I had when Gmail App rendered the desktop version of my template.

Example of the code block I used to force Gmail Apps to render the desktop version.

<!--GMAIL APP FIX [START]-->
<table cellpadding="0" cellspacing="0" border="0" align="center" width="610px" class="responsive-table gmail-hide" style="text-decoration: none; border: 0px solid white;">
    <tr>
        <td cellpadding="0" cellspacing="0" border="0" style="background-color:white; line-height:2px;" height="2px; min-width: 610px;">
            <img src="#" height="2px" width="610px" style="max-height:2px; min-height:2px; display:block; width:610px; min-width:610px;" />
        </td>
    </tr>
</table>
<!--GMAIL APP FIX [END]-->

The issues I had when gmail rendered the mobile version was many. The most significant was alignment issues and padding. I had a two column layout and when in mobile version my conditional css were not in effect due to they have been striped by gmail. So I dont really see how one can in a easy way fix this with only inline css.

Now I have discovered that I have the same problems with Inbox by Gmail. As I understand Inbox by Gmail is fairly new and when searching the webb I find little or none articles that describes some approach to this new client/app.

What I am looking for is a way if possible, to force Inbox by Gmail to render the desktop version. As I currently are doing for Gmail Apps. But maybe that is not possible to do?

As Inbox by Gmail is quiet new this is the only worth noticing links I have found on the web concerning Inbox by Gmail:

  • https://litmus.com/blog/a-first-look-at-inbox-by-gmail-what-email-marketers-need-to-know

  • https://litmus.com/community/code/787-email-rendering-in-new-gmail-inbox-app

Grateful for answers.


回答1:


The simplest and easiest solution I've found is to define an inline font-size, and mark it as !important. Otherwise the Gmail takes it upon itself to adjust the font-size by as much as 50%!

Source:
http://css-tricks.com/override-gmail-mobile-optimized-email



来源:https://stackoverflow.com/questions/35479271/force-inbox-by-gmail-to-render-desktop-version

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!