I recently designed a responsive HTML newsletter with all images neatly wrapped in tables. My goal was to ensure that on smaller screens, the tables stack on top of each other for better readability, while on wider displays, they appear side by side in a row. This approach worked smoothly in Chrome but presented some issues in Firefox. To showcase the problem, I've included the entire HTML snippet below. I initially planned to create a fiddle for easier testing, but surprisingly, everything seemed fine there.
HTML
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>float image</title>
<style type="text/css">
table {border-collapse: collapse;}
td {font-family: arial, sans-serif; color: #333333;}
@media only screen and (max-width: 620px) {
body,table,td,p,a,li,blockquote {
-webkit-text-size-adjust:none !important;
}
table {width: 100% !important;}
td[class="scale_img"] img{
height: auto !important;
max-width: 400px !important;
width: 100% !important;
}
}
}
</style>
</head>
<body style="margin:0; padding:10px 0;" bgcolor="#ededed" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table border="0" cellpadding="0" cellspacing="0" bgcolor="#ebebeb" width="100%">
<tbody>
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" align="center" width="600" bgcolor="#FFFFFF">
<tbody>
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" align="left" width="32%">
<tbody>
<tr>
<td style="padding: 0 18px 0 18px;" align="center" class="scale_img">
<img src="http://projector.buyingguide.com.au/images/225_on_16_9.jpg" width="160" alt="">
</td>
</tr>
<tr>
<td style="font-size: 0; line-height: 0;" height="20"> </td>
</tr>
<tr>
<td style="font-size: 0; line-height: 0;" height="20"> </td>
</tr>
</tbody>
</table>
<table border="0" cellpadding="0" cellspacing="0" align="left" width="32%">
<tbody>
<tr>
<td style="padding: 0 18px 0 18px;" align="center" class="scale_img">
<img src="http://projector.buyingguide.com.au/images/225_on_16_9.jpg" width="160" alt="">
</td>
</tr>
<tr>
<td style="font-size: 0; line-height: 0;" height="20"> </td>
</tr>
<tr>
<td style="font-size: 0; line-height: 0;" height="20"> </td>
</tr>
</tbody>
</table>
<table border="0" cellpadding="0" cellspacing="0" align="left" width="32%">
<tbody>
<tr>
<td style="padding: 0 18px 0 18px;" align="center" class="scale_img">
<img src="http://projector.buyingguide.com.au/images/225_on_16_9.jpg" width="160" alt="">
</td>
</tr>
<tr>
<td style="font-size: 0; line-height: 0;" height="20"> </td>
</tr>
<tr>
<td style="font-size: 0; line-height: 0;" height="20"> </td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style="font-size: 0; line-height: 0;" height="20"> </td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>