I have looked all over for an answer for this. I'm using Mailchimp to compose an email campaign. I have some custom CSS with a media query for mobile styles. The problem is that Gmail is not recognizing the media query. Other mobile email clients are, but Gmail is not.
I have reached out to Mailchimp support and received no guidance. I have looked on StackOverflow and other articles and tried to implement the ideas shared. I have had no luck.
Any help is appreciated. Thanks
Here is the CSS for my email:
I have tried by attribute selector and class but both are not working.
<style type="text/css">
.top-container img {
display: inline-block;
margin-right: 30px;
}
.content {
display: inline-block;
text-align: left;
vertical-align: top;
margin-top: 40px;
width: 60%;
}
.content p {
text-align: left;
}
@media only screen and (max-width:600px) {
.content {
width: 100%!important;
}
.content p {
text-align: center;
}
.top-container img {
margin-left: auto;
margin-right: auto;
display: block;
}
}
</style>
I want to write media query for making some text and images center by making full width in mobile view.