Start with fluid dimensions
Responsive email design begins with a layout that can shrink without losing its essential content. Fixed-width containers often cause horizontal scrolling on narrow devices.
Combine percentage widths with maximum-width constraints. Some email clients require additional fallback markup, so verify the result in the clients your audience actually uses.
<table role="presentation" width="100%"
style="max-width:600px;margin:0 auto;">
<tr>
<td style="padding:20px;">
Responsive email content
</td>
</tr>
</table>Make images flexible
Give images an appropriate HTML width attribute and responsive inline styling. Preserve their aspect ratio so that resizing does not distort photographs or product illustrations.
Avoid putting important text inside images. A recipient may have images disabled, and text embedded in an image cannot adapt to the available reading width.
<img src="https://example.com/banner.jpg"
width="600" alt="Product announcement"
style="display:block;width:100%;
max-width:600px;height:auto;">Use media queries as enhancements
Media queries can adjust spacing and typography on smaller screens when supported. The base template should remain usable even if these rules are removed or ignored.
Keep primary actions visible and provide sufficient space around buttons. Avoid horizontal navigation that depends on hover interactions.
<style>
@media only screen and (max-width:600px) {
.content { padding:16px !important; }
.heading { font-size:24px !important; }
}
</style>Test intermediate viewport widths
Do not test only the largest desktop and smallest mobile sizes. Intermediate widths can reveal columns that become too narrow or images that unexpectedly overflow.
Use MailViewer's custom width feature to explore these transitions, then send real test messages before releasing the template.
Test your HTML email
Use MailViewer to preview, format and validate your HTML email directly in your browser.
Open MailViewer →