UPDATE: MJML 3.3.3 is now available, so it works in the try it live
So this work with MJML 3.3.3(beta 3 for now), so it doesn't work in current mjml try it live :
<mjml>
<mj-head>
<mj-style inline="inline">
div[style*="height:400px"] {
height: inherit !important;
}
</mj-style>
<mj-style>
@media only screen and (min-width:480px) {
.equal-text {
height: 400px !important;
}
.equal-text td {
vertical-align: top;
}
}
</mj-style>
</mj-head>
<mj-body>
<mj-container>
<mj-section>
<mj-column>
<mj-text css-class="equal-text" height="400px" font-size="20px" color="#F45E43" font-family="helvetica">Lorem ipsum dolor sit amet, consectetur adipiscing elit. In malesuada tellus ac magna pellentesque vehicula. Vestibulum placerat elit non risus dapibus auctor. Pellentesque pretium ultrices iaculis. Donec ac iaculis massa, .</mj-text>
<mj-button>Testing testing testing</mj-button>
</mj-column>
<mj-column>
<mj-text css-class="equal-text" height="400px" font-size="20px" color="#F45E43" font-family="helvetica">Lorem ipsum dolor sit amet, consectetur adipiscing elit. In malesuada tellus ac magna pellentesque vehicula. Vestibulum placerat elit non risus dapibus auctor. Pellentesque pretium ultrices iaculis. Donec ac iaculis massa, in iaculis nibh. Suspendisse id odio urna. Cras nisi ipsum, mattis in dui id, pretium tincidunt purus. Mauris mi diam, molestie ac facilisis sed, scelerisque sit amet enim. .</mj-text>
<mj-button>Testing testing testing</mj-button>
</mj-column>
</mj-section>
</mj-container>
</mj-body>
</mjml>
Some insights : you have to set a height for mj-text to keep both column with same height. It's only a trick to achieve this because both div are independent and there's no way to achieve this in email with current MJML markup. Problem is, it will have a "gap" between text & button on mobile when column has less that 400px of text.
So... we're tweaking the output HTML a bit with a media query ( since almost every desktop client support them anyway ) :
- setting height to initial to have a mobile version without any height
- add a media query to add the heigh back.
Why keeping the height="400px" on the mj-text ? MJML generate some outlook conditionnals table when an height is set on mj-text : so we're keeping outlook compatibility with this :)
Side note: on your intial markup you have mj-text in a section, you have to put a column even if you have only one in a section.
Here's a small litmus link for compatibility https://litmus.com/checklist/emails/public/8b29552