How can I add different paddings depending on screen size? #1297
-
I just wonder if don't use tailwind how can I have a responsive style with react-email? For ex: I want 20px padding-top in desktop, 8px in mobile. How can I archive that by using react-email or style attribute? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
And I think the documentation is missing this. There should be a styling section. |
Beta Was this translation helpful? Give feedback.
-
I am not sure if we need this, this is more of a learn-how-to-write email HTML than a learn-React-Email thing. Answering your question though, you can just add a |
Beta Was this translation helpful? Give feedback.
I am not sure if we need this, this is more of a learn-how-to-write email HTML than a learn-React-Email thing.
Answering your question though, you can just add a
<style>
tag on your Head and there use media queries. It is the sameas what Tailwind does right now. Just be careful with escaping characters.