You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Columns can easily be 100% width on mobile by using media queries.
Some email clients, like for example gmail, can not ready those media queries, but we can force those clients to just scale the whole email by adding a fixed size responsive fallback element which is hidden on other clients.
The overall email with, 600px in my example, should be set by a prop maybe
Proposal
add class .responsive to column <td>s
add style tag to the <head> element with a responsive media query to force 100% width on mobile
<style type="text/css">
@media only screen and (max-width: 600px) {
.responsive {
width: 100% !important;
display: block;
}
}
</style>
add style tag to the <head> element with a responsive fallback condition
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
Make multiple columns responsive on mobile
Background
Columns can easily be 100% width on mobile by using media queries.
Some email clients, like for example gmail, can not ready those media queries, but we can force those clients to just scale the whole email by adding a fixed size responsive fallback element which is hidden on other clients.
The overall email with, 600px in my example, should be set by a prop maybe
Proposal
.responsive
to column<td>
s<head>
element with a responsive media query to force 100% width on mobile<head>
element with a responsive fallback conditionBeta Was this translation helpful? Give feedback.
All reactions