Emails: Hide Text/Images on mobile view

Ryan_Garcia
Level 2

Emails: Hide Text/Images on mobile view

Is it possible to hide and/or show text/images when viewed on mobile and display the text/images when viewed on desktop? I know for websites you can use the code: <div class="hidden-xs"> <div class="visible-xs">.  I tried modifying the template code and keep failing miserably.

3 REPLIES 3
Jim_Thao7
Level 9

Re: Emails: Hide Text/Images on mobile view

Did you build those classes into your media queries to display:none ?

Grace_Brebner3
Level 10 - Champion

Re: Emails: Hide Text/Images on mobile view

Hey Ryan,

To Jim's point, the reason those classes work on websites is because they refer to css which applies display:none on specific media queries. You'll need to have an equivalent class in your email template to enable this functionality - if you're comfortable with code you can probably find this, but otherwise best to chat with a developer (or share your template code here).

Jay_Jiang
Level 10

Re: Emails: Hide Text/Images on mobile view

Adding on to the above replies, you won't get it working across all email clients. Some email clients ignore media queries, some ignore <style> tags all together and only read inline style.