Wie zentriere ich einen E-Mail-Newsletter vom Herausgeber?

1264
Leisl

Wenn ich einen E-Mail-Newsletter im Herausgeber erstelle und dann per E-Mail versende, wird der Newsletter auf der Seite auf der linken Seite der E-Mail angezeigt. Wie zentriere ich den Newsletter innerhalb der E-Mail?

1
Das hängt vom E-Mail-Client-Programm ab. Da Sie nicht steuern können, welches E-Mail-Programm Ihre Endbenutzer verwenden, ist es eher eine sinnlose Übung, es zu beheben. DavidPostill vor 7 Jahren 0

1 Antwort auf die Frage

0
Ted Goas

Hier ist eine grundlegende Version des Codes, den ich zum Erstellen von E-Mails verwende, die sich auf E-Mail-Clients konzentrieren. Dies funktioniert in allen E-Mail-Clients (auch in Outlook, Gmail usw.), auch auf Mobiltelefonen.

<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <meta http-equiv="X-UA-Compatible" content="IE=edge">  <title></title>  <style>  /* What it does: Remove spaces around the email design added by some email clients. */ html, body { margin: 0 auto !important; padding: 0 !important; height: 100% !important; width: 100% !important; }  /* What it does: Centers email on Android 4.4 */ div[style*="margin: 16px 0"] { margin:0 !important; }  /* What it does: Stops Outlook from adding extra spacing to tables. */ table, td { mso-table-lspace: 0pt !important; mso-table-rspace: 0pt !important; }  /* What it does: Fixes webkit padding issue. Fix for Yahoo mail table alignment bug. Applies table-layout to the first 2 tables then removes for anything nested deeper. */ table { border-spacing: 0 !important; border-collapse: collapse !important; table-layout: fixed !important; margin: 0 auto !important; } table table table { table-layout: auto;  }  </style>   </head> <body width="100%" bgcolor="#ffffff" style="margin: 0;"> <center style="width: 100%; background: #ffffff;">  <div style="max-width: 680px; margin: auto;"> <!--[if mso]> <table role="presentation" cellspacing="0" cellpadding="0" border="0" width="680" align="center"> <tr> <td> <![endif]-->  <!-- Centered Email : BEGIN --> <table role="presentation" cellspacing="0" cellpadding="0" border="0" align="center" width="100%" style="max-width: 680px;"> <tr> <td style=""> EMAIL CONTENT GOES HERE </td> </tr> </table> <!-- Centered Email : END -->  <!--[if mso]> </td> </tr> </table> <![endif]--> </div> </center> </body> </html> 

Vollständiger Code hier verfügbar .