I
I
IliaMal2021-08-31 18:45:47
css
IliaMal, 2021-08-31 18:45:47

Why doesn't @media (min-width: 640px) work in post templates?

Hello.

It is necessary to make up a letter with adaptation for mobile devices.
I write as for normal html:

<style>
  .text--normal {
    font-size: 22px;
  }
  @media (max-width: 640px) {  /* или @media only screen and (max-device-width: 640px) */
    .text--normal {
      font-size: 16px;
    }
  }
</style>
<p class="text--normal">Произвольный текст</p>


If I check in the browser, then everything is OK. But in the email test service, styles for mobile devices are ignored.

How to create responsive design for emails?
Is it possible to somehow stuff @mediathe tag ( ) into the inside? <p style="{сюда}"></p>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey delphinpro, 2021-08-31
@delphinpro

Because no email client supports media queries.
https://yandex.ru/search/?text=adaptive+design+d...

I
Iryna, 2021-09-10
@IrochkaZ

Everything is on the first request https://www.unisender.com/en/blog/sovety/kak-svers...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question