Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when images in a column are too large, the column is extended to overlap the adjacent column instead of stacking columns. #3

Closed
ludobrands opened this issue Jan 31, 2016 · 3 comments
Assignees

Comments

@ludobrands
Copy link

try following code:

<mj-body>
  <mj-section>
    <mj-column>
      <mj-image src="https://fr.mailjet.com/wp-content/uploads/2015/09/personnalisation.png"></mj-image>
      <mj-divider border-color="#F45E43"></mj-divider>
      <mj-text font-size="20px" color="#F45E43" font-family="helvetica">Hello World test test test test test test test test test test test test test test test test</mj-text>
    </mj-column>
    <mj-column>
      <mj-image src="https://fr.mailjet.com/wp-content/uploads/2015/09/personnalisation.png"></mj-image>
      <mj-divider border-color="#F45E43"></mj-divider>
      <mj-text font-size="20px" color="#F45E43" font-family="helvetica">Hello World test test test test test test test test test test test test test test test test</mj-text>
    </mj-column>
  </mj-section>
</mj-body>
@arnaudbreton
Copy link
Contributor

Adding width="100%" on both images fixes the layout.
However, both images end up with a style max-width: NaN;. Fixing that seem to fix the issue as well, without having to add the width attribute in the markup.

To be tested with Litmus to validate this render properly in email clients.

@iRyusa
Copy link
Member

iRyusa commented Feb 1, 2016

I'm working on it, mj-image with no width + parent column with no width cause the image to have NaN width and maxWidth.

@iRyusa
Copy link
Member

iRyusa commented Feb 3, 2016

Now the image is scaled down to match column width

See PR #9 for implementation details

@iRyusa iRyusa closed this as completed Feb 3, 2016
iRyusa pushed a commit that referenced this issue May 26, 2020
add sizes attribute to mj-image and mj-social-element
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants