Community Forum

Over the years we have built up a community of email marketers, coders and designers that live and breathe email.

Use the Email on Acid Forum like your virtual water cooler: Stop by to discuss email code, quirky clients and fixes and post your issues (with an example of the code) for our community to offer its assistance.

 
   
Using CSS to hide CTA button

iFreedom

Newbie
Total Posts:  8
Posted: 25 January 2016 04:48 AM

We are designing a new responsive email design template and want to present certain elements based on whether its viewed on a device or desktop. 

For example, having a CTA button to “call us” makes sense on mobile, but it doesn’t make sense when someone is reading it on a desktop. Ideally, we’d like to replace the CTA with a horizontal bar since the CTA button/copy is the first element after the Hero image.


Thanks!


 

Geoff Phillips

Avatar
Moderator
Total Posts:  386
Posted: 25 January 2016 05:38 AM
[ # 1 ]

iFreedom,
Welcome to the forum!

I think that this post should be very helpful. It’s about how to use a different image for mobile, but the technique should work just as well for a button or other element. Just know that on the Gmail app, it’s not possible to deliver different content through CSS. Gmail strips most CSS from the head of each email.

https://www.emailonacid.com/blog/article/email-development/a_slick_new_image_swapping_technique_for_responsive_emails