mj-column width doesn't work on Gmail mobile and desktop when printing
See original GitHub issueDescribe the bug
the width
property of the mj-column
element is ignored on mobile and on desktop when using the Print functionality of Gmail.
To Reproduce Steps to reproduce the behavior:
- Create a file with this MJML code:
<mjml>
<mj-body>
<mj-section>
<mj-column width="50%" background-color="red">
<mj-text>Left column</mj-text>
</mj-column>
<mj-column width="50%" background-color="orange">
<mj-text>Right column</mj-text>
</mj-column>
</mj-section>
</mj-body>
</mjml>
- Render it to HTML
- Send the HTML to a Gmail address
- Open the mail with Gmail
- On desktop, use the “Print” functionality on the dropdown of the mail
- See the error
Expected behavior Columns should be displayed side-by-side :
Observed behavior Columns are displayed over under, with a width of 100%.
MJML environment (please complete the following information):
- OS: Linux
- MJML Version 4.0.5
Email sending environment(for rendering issues):
- SendGrid
Affected email clients (for rendering issues):
- Email Client: Gmail (others untested yet)
- OS: All
- Browser: All
Additional context I tried the solutions given for the following issues but they didn’t do the trick (unless I missed something) :
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
MJML column width incorrect on Android GMAIL App
I have created a responsive flyer template using the latest mjml transpiler (2.0.0). The mjml source can be viewed at ...
Read more >mjml-guides – Documentation for MJML - The Responsive ...
The sum of columns in a section cannot be greater than the width of the parent `mj-section` (or 100%). Every single column has...
Read more >MJML – How To Make Responsive HTML Email Coding Easy
Once again, this section is easy to achieve by leveraging the <mj-column> component, using one column per social network icon and wrapping all ......
Read more >What is your email framework of choice? - Litmus
MJML, on the other hand, defaults all mobile columns to 100% width. This means that to create multi-column mobile layouts you employ another ......
Read more >CSS Media Queries & Using Available Space
@media screen { body { width: 75%; } } @media print { body { width: ... emails to make them look awesome in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
And you have also Mj-group to keep the same behavior on mobile
On Mon, Dec 3, 2018 at 7:55 PM Maxime Brazeilles < maxime.brazeilles@gmail.com> wrote:
– Cordialement, Maxime BRAZEILLES
Thanks! I should’ve had a better read at the doc for mobiles. I’m closing the issue.