Created
January 28, 2016 14:40
-
-
Save fcarneiro/8eb49f18d52790246a57 to your computer and use it in GitHub Desktop.
HTML Email Reset & Client-specific Styles
This file contains hidden or 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
<style type="text/css"> | |
/*////// RESET STYLES //////*/ | |
p{margin:0 0 10px 0;} | |
a{word-wrap:break-word;} | |
table{border-collapse:collapse;} | |
h1, h2, h3, h4, h5, h6{display:block; margin:0; padding:0;} | |
img, a img{border:0; height:auto; outline:none; text-decoration:none;} | |
body, #bodyTable, #bodyCell{height:100%; margin:0; padding:0; width:100%;} | |
/*////// CLIENT-SPECIFIC STYLES //////*/ | |
#outlook a{padding:0;} /* Force Outlook 2007 and up to provide a "view in browser" message. */ | |
@-ms-viewport{width:device-width;} /* Force IE "snap mode" to render widths normally. */ | |
img{-ms-interpolation-mode:bicubic;} /* Force IE to smoothly render resized images. */ | |
table{mso-table-lspace:0pt; mso-table-rspace:0pt;} /* Remove spacing between tables in Outlook Desktop. */ | |
.ReadMsgBody{width:100%;} .ExternalClass{width:100%;} /* Force Outlook.com to display emails at full width. */ | |
p, a, li, td, blockquote{mso-line-height-rule:exactly;} /* Force Outlook Desktop to render line heights as they're originally set. */ | |
a[href^="tel"], a[href^="sms"]{color:inherit; cursor:default; text-decoration:none;} /* Force mobile devices to inherit declared link styles. */ | |
p, a, li, td, body, table, blockquote{-ms-text-size-adjust:100%; -webkit-text-size-adjust:100%;} /* Prevent Windows- and Webkit-based mobile platforms from changing declared text sizes. */ | |
.ExternalClass, .ExternalClass p, .ExternalClass td, .ExternalClass div, .ExternalClass span, .ExternalClass font{line-height:100%;} /* Force Outlook.com to display line heights normally. */ | |
a[x-apple-data-detectors]{color:inherit !important; text-decoration:none !important; font-size:inherit !important; font-family:inherit !important; font-weight:inherit !important; line-height:inherit !important;} /* Force iOS devices to heed link styles set in CSS. */ | |
</style> |
Read - me
Read - me
Read - me
Read - me
Read me
Read - me
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Read - me