Feb 14, 20197:08 AM - edited Feb 14, 20197:14 AM
Participant
Removing the padding for a custom module in drag and drop email
Hi,
I'm currently trying to fit a custom module to full width inside a drag and drop email template (newsletter). I order to do this I created a boolean field for the module and added the following code:
This pushes the margin to -20px and the width: auto automatically adjusts to accommodate that. This looks fine in the email builder, but the email body padding is pushed outside the body in Outlook 2016. Setting a fixed width will achieve the same result.
The entire module is wrapped in padding:20px 10px, so I would need a way to override this. I came across no_wrapper = true parameter but I couldn't get it to work.
Preview (one module has a negative margin, the other has the following condition
{% if module.two_col_eql_with_top_image == 'Yes' %}
{% set no_wrapper = true %}
Removing the padding for a custom module in drag and drop email
Hey @Aaaaandrei , negative margin is a no no in email development. Email clients like Outlook use an old Microsoft Word html rendering engine that do funky things with some css.
I like kudos almost as much as cake – a close second.