mjmlio / mjml

MJML: the only framework that makes responsive-email easy

Home Page:https://mjml.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Setting width in mj-column adds left and right padding

yuzhouliu9 opened this issue · comments

Describe the bug
When mj-column has width defined it seems to add left and right padding. I would have expected it to still take up the entire body size.

Here is with width="25%" on first column. Notice the extra left and right white space.
image

Without width="25%". Notice less left and right white space.
image

To Reproduce
Use MJML app. See above for reproduction. The rendered result in email client is same.

Expected behavior
The full mj-body or outer mj-section is taken up by the columns regardless if width is set or not. With width="25%" set, it should still align as left as possible taking up 25% of space. While the other column takes up rest of the space. The total available space should not have shrunk.

MJML environment (please complete the following information):

  • OS: MacOS
  • MJML Version: 4.12.0
  • MJML tool used: MJML App

Email sending environment(for rendering issues):
N/A.

Affected email clients (for rendering issues):
N/A

This is not something we can really manage here, this behavior come from default value of width for column.
Screenshot 2024-01-09 at 13 11 02

Here you have a 25% column + a 50%, extra 25% missing is just controlled by the text-align on mj-section