S
S
Sergey questions2017-10-18 15:06:20
css
Sergey questions, 2017-10-18 15:06:20

Why does the class disappear when html layout of the letter?

Hello. I am typing a template for an order confirmation letter in an online store. In the engine, the template is written like this:

<!DOCTYPE html>
<html lang="ru">
<head>
  <meta name="viewport" content="width=device-width;initial-scale=1.0; user-scalable=1;" />
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <title>Шаблон пи сьма</title>
  
  <style>
  @media only screen and (max-width: 480px) {
  }
  </style>
</head>
<body bgcolor="#000" style="margin: 0; padding: 0;">

<div class="e_test" style="display:table;width:100%;">тестирование</div>

</body>
</html>

A letter arrives at the mail (Yandex), in the code of which it disappears @media only screen and (max-width: 480px)
Also instead of
<div class="e_test" style="display:table;width:100%;">тестирование</div>

Comes
<div style="display:table;width:100%;">тестирование</div>

Those. all divs disappear class=""
How to be, what's wrong? I think this can be somehow bypassed, after all, they make up adaptive letters, and for example , on github, there is a similar code in the letter template .. I don’t understand, help.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
H
HamSter, 2017-10-18
@smartycms

Not all email clients support media queries and style.
Support table: campaignmonitor

S
Stalker_RED, 2017-10-18
@Stalker_RED

Here is a series of articles on this topic in Russian https://www.google.com/search?q=habr+imposition+letters
In short, everything is very bad, from the word at all. In addition to Yandex, there are other mail systems, and people also use desktop mail programs and phone applications. And ALL have their troubles, their bugs and problems.

P
profesor08, 2017-10-18
@profesor08

https://habrahabr.ru/post/252279/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question