Reputation: 17
I'm having some issues with css and inline styles on an email campaign I'm doing.
Firstly I ended up cheating a bit in that I was hiding elements (display:none;) to make them appear in the right order when using the @media css. The issue here was when displaying on a desktop isp (gmail) it ignored the (display:none;) and ended up showing double content in places. So to the double content disappear I used (display:none !important;) which then affected the mobile version.
There are some mobile templates I've seen online which don't appear to have had much testing as they simply do not work across multiple mail clients.
The code is here if anyone has any suggestions or help http://www.makeyourownmarket.com/test/test-doc.html
Upvotes: 0
Views: 5750
Reputation: 1937
Some tips for responsive emails:
Put your !important
declaration on all of your @media only screen and (max-width: 480px)
CSS
Think of workarounds, if display:none;
isn't working, try width:0;height:0;
on your inline CSSand then override with width:100px !important;height:100px !important;
in your mobile styles
You will need to do extensive testing, having an account/device for all the significant email clients is the best, but http://www.emailonacid.com works in a pinch.
Upvotes: 5
Reputation: 5095
I dont think responsive design is the right way for emails. Usually emails are made inside the table because of many mail clients. You could find more about this here Nettuts
Upvotes: -2
Reputation: 21050
I'd recommend doing a little more research into HTML emails and their limitations.
This article is a good starting point: http://kb.mailchimp.com/article/how-to-code-html-emails
Some tips:
Upvotes: 4