Open ProdigyMaster opened 6 years ago
Somebody something? :(
Hi @ProdigyMaster, i made some tests, but that's not an easy one, the full-width wrapper with background-src is not handled well on this outlook version indeed.
Adding position:relative;
in the <v:rect
style fixes part of the problem but i saw other bugs appear, depending on the content of the email...
I'll make more tests in a near future
Well as "full width" wrapper is quite new in MJML4 for outlook, I think we never tested it in wrapper 🤔
About the no-repeat
being ignore, desktop outlook doesn't support such feature so there's no way to do this
I'm having the same problem. Is there a workaround for making a repeating background image extend to full width that works in Outlook?
Here is an example of how I'm trying to use the full-width in mj-wrapper with a background image
<mjml>
<mj-body background-color="#2f425f">
<!-- full-width changes background from 600px to 100% max-width but is broken on outlook 2019-->
<mj-wrapper
css-class="wrapper"
background-url="https://res.cloudinary.com/saasquatch/image/upload/v1541004426/tile-jobstack-background_mmciwg.png"
background-repeat="repeat"
background-size="200px"
full-width="full-width"
>
<!-- Header Section -->
<mj-section padding="5px 0 5px 0">
<mj-column
background-color="#fff"
border-radius="10px 10px 5px 5px">
<mj-image
width="400px"
src="https://www.petsworld.in/blog/wp-content/uploads/2014/09/cute-kittens.jpg"
border-radius="5px 5px 0px 0px"
padding="0px"
>
</mj-image>
<mj-text
align="left"
font-size="24px"
font-weight="bold"
color="#000000"
font-family="Arial, sans-serif"
padding="20px 10px 5px 15px">
Good News!
</mj-text>
</mj-column>
</mj-section>
</mj-wrapper>
</mj-body>
</mjml>
On a side note, I'm loving mjml.
This is my current best workaround
;TLDR
I set the body to width=1200px The background is still in the mj-wrapper all the columns are set to width=600px
It's probably not perfect, but it's looking correct in our supported email clients.
UPDATE: this work around only works if you have one column in your email. I also had to set the column widths to 800px to keep it from breaking on outlook.com. So... not a great solution.
<mjml>
<!-- set body width to hardcoded 1200px -->
<mj-body background-color="#2f425f" width="1200px">
<!-- removed full width from wrapper-->
<mj-wrapper
css-class="wrapper"
background-url="https://res.cloudinary.com/saasquatch/image/upload/v1541004426/tile-jobstack-background_mmciwg.png"
background-repeat="repeat"
background-size="200px"
>
<!-- Header Section -->
<!-- set column to hard coded 600px -->
<mj-section padding="5px 0 5px 0">
<mj-column
background-color="#fff"
border-radius="10px 10px 5px 5px"
width="600px">
<mj-image
width="400px"
src="https://www.petsworld.in/blog/wp-content/uploads/2014/09/cute-kittens.jpg"
border-radius="5px 5px 0px 0px"
padding="0px"
>
</mj-image>
<mj-text
align="left"
font-size="24px"
font-weight="bold"
color="#000000"
font-family="Arial, sans-serif"
padding="20px 10px 5px 15px">
Good News!
</mj-text>
</mj-column>
</mj-section>
</mj-wrapper>
</mj-body>
</mjml>
Editing the title to reflect the issue
Is it possible to limit the width of the mj-wrapper? In the outlook, the background is repeated not only vertically, but also horizontally. Limiting the width would solve background repeating problem.
Hello! I got the same problem (content is on the left side in Outlook 2016/2019) if using mj-wrapper
for background with full-width
.
Does this problem have a workaround?
We used css class for mj-body
with background-image property and not used mj-wrapper
(in Outlook background not displayed but the content have normal view).
But I think it's not a best solution.
UPD:
All work fine if disabled blocking autoload images in Outlook settings
Describe the bug Hi, I have got problem with mj-wrapper on Outlook 2016 and Outlook 2013 120 DPI whole email content is on the left site. On other clients it works fine. When i delete mj-wrapper email backs to normal (center). (2) And background is repeating when repeating is set to none.
To Reproduce
Expected behavior Content: center. Background-repeat: none
MJML environment (please complete the following information):
Affected email clients (for rendering issues):
Screenshots
https://ibb.co/j8ZxwV https://ibb.co/feGXVq