I'm trying to "hide" the wrapper "" on mobile screens, not by actually hiding it or "not displaying it", but by setting the padding to 0px. My initial approach was to use media queries, but my attempts have failed.
Below is the styling for the media query:
<mj-head>
<mj-style>
.wrapper-fix div {
padding: 0px 50px !important;
}
@media only screen and (max-width: 480px){
.wrapper-fix div {
padding: 0px 0px !important;
}
}
</mj-style>
</mj-head>
And below is the wrapper:
<mj-wrapper css-class="wrapping-fix" background-color="#fff">
<mj-include path="./somecontent.mjml" />
</mj-wrapper>
The approach above doesn't work. My understanding is that the 50/0px are added to tags after inlining - the actual html content for the email. The doesn't really exist there.
Did anyone manage to do something like this? How can it be solved? Are there any alternatives?