Nástroje používateľa

Nástoje správy stránok


blog:odborny:2019-11-05-forcing_gmail_to_send_email_with_zero_margins

Rozdiely

Tu môžete vidieť rozdiely medzi vybranou verziou a aktuálnou verziou danej stránky.

Odkaz na tento prehľad zmien

Nasledujúca revízia
Predchádzajúca revízia
blog:odborny:2019-11-05-forcing_gmail_to_send_email_with_zero_margins [2019/11/05 01:17]
Róbert Toth vytvorené
blog:odborny:2019-11-05-forcing_gmail_to_send_email_with_zero_margins [2020/01/06 22:08]
Róbert Toth
Riadok 14: Riadok 14:
   - On the top of the email, write:<code>   - On the top of the email, write:<code>
 <style> <style>
-  body,#bodyTable,#bodyCell{+  body, #bodyTable, #bodyCell {
     height:100%;     height:100%;
     margin:0;     margin:0;
     padding:0;     padding:0;
     width:100%;     width:100%;
 +  }
 +  :root {
 +    color-scheme: light only;
   }   }
 </style> </style>
 <meta name="viewport" content="width=device-width, initial-scale=1" class=""> <meta name="viewport" content="width=device-width, initial-scale=1" class="">
-</code> The ''<style>''-tag first part will remove the borders for desktop clients, while the ''viewport'' meta tag will achieve the same on mobile devices. You may eventually remove the ''#bodyTable,#bodyCell'' selectors if they are not present in e-mail source code (Mailchimp usually uses them in its e-mails).+<meta name="color-scheme" content="light only"> 
 +</code> 
 +    - The ''<style>''-tag first part will remove the borders for desktop clients
 +    - The ''viewport'' meta tag will achieve the same on mobile devices. You may eventually remove the ''#bodyTable'' and ''#bodyCell'' selectors if they are not present in e-mail source code (Mailchimp usually uses them in its e-mails). 
 +    - The last part with ''color-scheme'' is there to prevent the email from getting different colors in iOS/macOS Dark mode (for more info, see [[https://stackoverflow.com/questions/58177703/how-to-prevent-ios-13-dark-mode-from-breaking-emails|this thread]] on StackOverflow and also [[https://webkit.org/blog/8840/dark-mode-support-in-webkit/|this article]].)
   - Click ''Save and Close'' and you are done!   - Click ''Save and Close'' and you are done!
  
blog/odborny/2019-11-05-forcing_gmail_to_send_email_with_zero_margins.txt · Posledná úprava: 2020/01/06 22:08 od Róbert Toth