Version detail: Sitecore 9.0.2 XP0

Deployment model: OnPremises

Scenario: We are sending an automatic 'HTML' campaign to users listing their last 4 orders. In case a user has less than 4 orders, we want to hide the empty HTML blocks. So, we used tokens to set the display attribute to none in case of empty blocks. But this display property was not working as expected.

What we checked: We added a block with the display property set to none. In the design view, this component was not visible. But it was back when we got it in the mailbox, as test mail as well as automatic mail.

Any idea what I should look further?

  • Could you specify email agent that you have problem with? – Anton Aug 9 '19 at 16:14
  • It is the outlook where I am facing this issue. – NutsAndBolts Aug 9 '19 at 17:29

display:none; doesn't work well with emails. Many emails clients doesn't support it. Even Gmail have started to support this property only recently.

You should other technique to hide blocks in emails: e.g.

max-height: 0px; overflow: hidden;


width: 0px; height: 0px; max-width: 0px; max-height: 0px; overflow: hidden;


width: 0px; height: 0px;

or if you have problem with Outlook

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.