Trying to craft an HTML email using tables but encountering an issue. When sending the email from Gmail to an iCloud account, there's unwanted white space at the top and bottom.
Below is a snippet of the code I've prepared for this query.
I experimented with adding style="border-collapse:
to my table as well as incorporating
style="margin: 0; padding: 0;
, yet neither resolved the problem. Setting the margin to zero removes the white space in my index.html when viewed on my PC but persists when opening the email on my iPhone.
Here's a representation of how it appears on iCloud:
https://i.sstatic.net/YyZp6.jpg
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
</head>
<body>
<table width="640px" align="center" cellspacing="0" cellpadding="0" style="border-collapse: collapse;" border="0">
<tr>
<td>
<img src="https://i.imgur.com/M2OgVKj.jpeg" style="display: block;
width: 100%" />
</td>
</tr>
</table>
</body>
</html>