Reputation: 53
How can I add inline media queries in style tag in inline?
<td class="width-33 content-cell" align="left" style="width: 33.33%; padding: 30px 0px; padding-bottom: 0px;">
I want to use a media query in this tag then how can I?
Upvotes: 3
Views: 12551
Reputation: 4479
Just like Samuellawrentz said media queries are not possible inline, it has to be in style
for it to work.
<style>
@media ...
</style>
The best and most recent collection of CSS that work in an email can be found at campaign monitor's blog.
Since you are after media queries, its supported by roughly 95% of the email clients now. Find the most recent list here.
Upvotes: 1
Reputation: 1732
No, the right way to add @media
queries is to use them in a CSS file rather than using them as an inline styling.
Media queries need a selector to work with. The better way would be to inject a <style></style>
tag and declare your media queries there.
Read this for reference Is it possible to put CSS @media rules inline?.
Upvotes: 2