Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to add an IE conditional statement to an email?

I'm trying to send an email, and for no reported bug fix out there can solve a margin error I am finding. I might be on the brilliant beginning of something never before seen by the web developer community! ;)

So I'm trying to write a IE conditional statement such as :

<!--[if gt IE 7]>
%img.header-left{:src => "http://hqchannel.com/images/me-header-left.jpg", :style => "height: 498px; width: 110px; display: block; float: left;"}
<![endif]-->

But this is read ( by gmail ), as just commented out HTML, and it is not parsed whatsoever no matter what browser I am using.

Any ideas?

like image 530
Trip Avatar asked Dec 07 '25 06:12

Trip


2 Answers

We cheated by adding a strip of white on the left to the image itself!

like image 143
Mo. Avatar answered Dec 08 '25 19:12

Mo.


Email renderers are very simple, and as (more?) varied than web browsers, their HTML support is usually not very robust.

Thus you should invoke 1990's HTML styles: Tables and spacer images. Or as you'll notice many marketing campaigns do - mosaic images. The simpler your email the more consistently it will render.

like image 25
Jason Peacock Avatar answered Dec 08 '25 18:12

Jason Peacock



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!