Lesson 37 of 50
cssCSS for Email
10 mins
Course progress74%
What you'll learn
Keep these ideas in mind as you work through the lesson.
Lesson 37 of 50
css10 mins
Keep these ideas in mind as you work through the lesson.
Email clients are a fragmented ecosystem. While modern webmail supports most CSS, legacy clients (Outlook 2007‑2019, Gmail mobile) fall back to a much smaller feature set.
<style> blocks.position:fixed.multipart/alternative).<table width="100%" cellpadding="0" cellspacing="0" border="0" style="font-family:Arial,sans-serif; background:#0066cc; color:#fff;">
<tr>
<td align="center" style="padding:20px;">
<h1 style="margin:0; font-size:24px;">Special Offer</h1>
<p style="margin:10px 0; font-size:16px;">Save 30% today!</p>
<a href="https://example.com" style="display:inline-block; background:#ff6600; color:#fff; padding:10px 20px; text-decoration:none; font-weight:bold;">Shop Now</a>
</td>
</tr>
</table>
| Issue | Symptom | Fix |
|---|---|---|
| CSS reset ignored | Margins/paddings appear wrong | Inline margin:0; padding:0; on <td>/<table> |
| Images break | No display:block causing gaps | Add display:block; on images |
| Links appear invisible | Default link colour overridden | Inline color:#fff; on <a> |
<mjml> or Foundation for Emails<mj-section>) that compiles to fully‑inlined HTML, saving hours of manual fiddling.alt text for every image.