I’m facing an issue where Gmail does not recognize my mobile media queries. I’ve designed an HTML email template with a table layout featuring three columns that showcase images and descriptions of products. While it displays correctly on desktop, I need these columns to appear in a vertical stack on mobile devices.
The media queries work flawlessly in Outlook’s mobile version, but Gmail seems to ignore them entirely, retaining the three horizontal columns on mobile, which makes reading difficult. Additionally, I can’t manage to change the background color on Gmail for mobile.
Here’s a simplified version of my code:
<style>
@media screen and (max-width: 480px) {
.container {
background-color: #F5F5F5 !important;
}
.column {
display: block !important;
width: 100% !important;
}
.mobile-text {
font-size: 16px !important;
}
}
</style>
<table class="container" width="100%" style="background-color: #FFFFFF; max-width: 600px;">
<tr>
<td>
<h1>Product Showcase</h1>
</td>
</tr>
</table>
<table width="100%" style="max-width: 600px; background-color: #EEEEEE;">
<tr>
<td class="column" width="33.33%" style="padding: 15px;">
<img src="product1.jpg" width="150" style="width: 100%; height: auto;">
<p class="mobile-text" style="font-size: 12px;">
<strong>Product One</strong><br>
Description here<br>
More details
</p>
</td>
<td class="column" width="33.33%" style="padding: 15px;">
<img src="product2.jpg" width="150" style="width: 100%; height: auto;">
<p class="mobile-text" style="font-size: 12px;">
<strong>Product Two</strong><br>
Description here<br>
More details
</p>
</td>
<td class="column" width="33.33%" style="padding: 15px;">
<img src="product3.jpg" width="150" style="width: 100%; height: auto;">
<p class="mobile-text" style="font-size: 12px;">
<strong>Product Three</strong><br>
Description here<br>
More details
</p>
</td>
</tr>
</table>
I’ve tested this on both Android and iPhone versions of the Gmail app, and the results are the same. Can anyone suggest how to ensure Gmail acknowledges responsive email styles?