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.

How to Target and Yahoo


Total Posts:  2
Posted: 22 June 2017 12:43 PM

Hey folks,

I’m having a hard time using “display: none !important;” and targeting Essentially I have two image at the top of the email and I’m hiding the bigger one on mobile devices and showing the larger one on Desktop. All is well with all clients accept (office 365) and Yahoo!

I did read this post here:

And that was helpful but I can’t seem to get this right: 

[owa] .square_ad { display: none !important; }

Not only does it not hide the square ad, it’s causing the square ad to NOT show up on mobile which is what I want.

ANY HELP would be MUCH appreciated.

<style type="text/css">

[owa] .square_ad { displaynone !important}
@media only screen and (max-device-width480px{
#container1 {display:block !important}
body[yahoo] p {font-size12px}
.leaderboard_ad {displaynone !important;}
@media only screen and (min-device-width768px{
#container1 {display:block !important}
body[yahoo] p {font-size14px}
.square_ad {displaynone !important;}
.square_ad {displaynone !important;}
[if gte mso 9]>
style type="text/css">
square_ad {displaynone !important;}


Alex Ilhan

Total Posts:  229
Posted: 23 June 2017 06:37 AM
[ # 1 ]

Hi Memberhub!

Thanks for joining us over here on the EoA forums.

Would you mind sharing your full code with me, please, by attaching it as a .HTML file to your post. I’ll take a look at it once it’s uploaded!




Total Posts:  2
Posted: 23 June 2017 11:45 AM
[ # 2 ]

Thank you!! This is actually .erb but I saved it as .html

File Attachments
notification_mailer.text.html  (File Size: 7KB - Downloads: 201)