Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save naveenlb/75f6a31dc6da368959d918f3dd467dab to your computer and use it in GitHub Desktop.
Save naveenlb/75f6a31dc6da368959d918f3dd467dab to your computer and use it in GitHub Desktop.
html email css reset - microsoft outlook
/* /\/\/\/\/\/\/\/\/ RESET STYLES /\/\/\/\/\/\/\/\/ */
body { font-family: sans-serif; }
body { margin: 0; padding: 0; }
img { border: 0 none; height: auto; line-height: 100%; outline: none; text-decoration: none; }
a img { border: 0 none; }
.imageFix { display: block; }
table, td { border-collapse: collapse; }
#bodyTable { height: 100% !important; margin: 0; padding: 0; width: 100% !important; }
h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6 { display: block; font-weight: bold; line-height: 100%; margin-top: 0; margin-right: 0; margin-bottom: 10px; margin-left: 0; text-align: left; }
h1, .h1 { font-size: 26px; }
h2, .h2 { font-size: 20px; }
h3, .h3 { font-size: 15px; }
h4, .h4 { font-size: 13px; }
h5, .h5 { font-size: 11px; }
h6, .h6 { font-size: 10px; }
/* ==== Footer Styles ==== */
a:link, a:visited, /* Yahoo! Mail Override */ a .yshortcuts /* Yahoo! Mail Override */ { font-weight: normal; text-decoration: underline; }
.hs-image-social-sharing-24 { max-width: 24px; max-height: 24px; }
/* Force Hotmail to display emails at full width */
p, span, font, td, div { line-height: 100%; }
/* Force Hotmail to display normal line spacing */
body, table, td, p, a, li, blockquote { -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
/* Prevent WebKit and Windows mobile changing default text sizes */
table, td { mso-table-lspace: 0pt; mso-table-rspace: 0pt; }
/* Remove spacing between tables in Outlook 2007 and up */
img { vertical-align: bottom; -ms-interpolation-mode: bicubic; }
/* Allow smoother rendering of resized image in Internet Explorer */
/* Reset Styles */
body { margin: 0; padding: 0; }
table { border-collapse: collapse !important; }
body { height: 100% !important; margin: 0; padding: 0; width: 100% !important; }
a:link, a:visited { border-bottom: none; }
/* iOS automatically adds a link to addresses */
/* Style the footer with the same color as the footer text */
#footer a { -webkit-text-size-adjust: none; text-decoration: underline; font-weight: normal }
/* ==== Mobile Styles ==== */
/* Constrain email width for small screens */
@media screen and (max-width:650px) {
/* Makes image expand to take 100% of width*/
img { width: 100% !important; height: auto !important; }
}
@media only screen and (max-width:480px) {
/* ==== Client-Specific Mobile Styles ==== */
body, table, td, p, a, li, blockquote { -webkit-text-size-adjust: none !important; }
/* Prevent Webkit platforms from changing default text sizes */
body { width: 100% !important; min-width: 100% !important; }
/* ==== Image Alignment Styles ==== */
h1, .h1 { font-size: 26px !important; line-height: 125% !important; }
h2, .h2 { font-size: 20px !important; line-height: 125% !important; }
h3, .h3 { font-size: 15px !important; line-height: 125% !important; }
h4, .h4 { font-size: 13px !important; line-height: 125% !important; }
h5, .h5 { font-size: 11px !important; line-height: 125% !important; }
h6, .h6 { font-size: 10px !important; line-height: 125% !important; }
.hide { display: none !important; }
}
/* /\/\/\/\/\/\/\/\/ RESET STYLES /\/\/\/\/\/\/\/\/ */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment