Created
June 16, 2014 14:15
-
-
Save townivan/3507a1b74f8b5591ac62 to your computer and use it in GitHub Desktop.
Email HTML. Hide content on desktop but show it on mobile. This is tougher because Outlook 2007 (desktop) won't recognize CSS that you would use to normally hide something.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* in your css. (in this example, in the media queries specific part which is just for phone) */ | |
@media only screen and (max-device-width:480px){ | |
*[class*="mobile-only"]{display:block !important;max-height:none !important} | |
} | |
<!-- this html section will only show on phones --> | |
<!--[if !mso]><!-- --> | |
<div class="mobile-only" style="font-size: 0; max-height: 0; overflow: hidden; display: none"> | |
<div style="text-align:center;"> | |
<img src="logo.png"> | |
</div> | |
</div> | |
<!--<![endif]--> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment