Gmail for Android (before version 13) has some bugs when rendering HTML emails, and here's how to fix them.
Gmail's older versions tend to ignore padding applied via style. The best workaround is using table-based layouts instead of <div> and applying cellpadding or td padding.
Example Fix Using <table>
<table role="presentation" width="100%" cellpadding="10" cellspacing="0" border="0">
<tr>
<td align="left" style="padding: 15px; background-color: #f4f4f4;">
This is a test email.
</td>
</tr>
</table>
✅ Using cellpadding="10" ensures padding works in Gmail.
Older Gmail versions may ignore text-align in <div>. The fix? Use table-based alignment.
<table><table role="presentation" width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td align="center" style="text-align: center; font-size: 16px;">
<p style="margin: 0;">Centered Text in Gmail</p>
</td>
</tr>
</table>
✅ align="center" ensures proper alignment in older Gmail versions.
!importantSome styles may get stripped, so use:
<p style="padding: 20px !important; text-align: center !important;">
Forced padding and alignment
</p>