We use cookies to make HubSpot's community a better place. Cookies help to provide a more personalized experience and relevant advertising for you, and web analytics for us. To learn more, and to see a full list of cookies we use, check out our Cookie Policy (baked goods not included).
May 20, 2022 2:20 PM
Media queries are not working in gmail mobile apps but the email is responsive in other apps. Below is my code for the style tag in the embedded code in design tools. Does anyone have any tips on creating responsive emails for gmail apps? Thanks for your help.
<style type="text/css">
@media (max-width:600px) {
.energyreportHeader {
width: 100%!important;
padding: 0!important;
}
.header-column-center {
display: table!important;
width: 100%!important;
max-width: 100%!important;
direction: ltr!important;
}
.header-column-center-td-top {
padding: 0px 0px 3px 0px!important;
}
.header-column-center-td-bottom {
padding: 0px 0px 6px 0px!important;
}
.header-column-center-td-bottom p {
text-align: left!important;
}
.resImage {
max-width: 300px!important;
width: 100%!important;
}
}
</style>
4 weeks ago
Thanks for mentioning @Jaycee_Lewis
Hi @EJackson23,
Styling for mailing can by hard. Especially responsive. How did you add your styling to the mailing template? You need to make sure your <style>
is included in the <head>
will it work.
I also recommend checking the documentation for Gmail:
4 weeks ago - last edited 4 weeks ago
Thank you @Indra. We are using "drag and drop" for this email not a template so I don't believe I can add coding to the <head>. We do have an html module we can place in a drag and drop email though so I add it to the top.
3 weeks ago
Hi @EJackson23,
HubSpot has function that can add CSS to your head. But I'm not sure it will work in e-mail templates. You can give it a try and check out the function require-css.
May 20, 2022 6:06 PM
Hi, @EJackson23 Thanks for the great question. Email template styling is definitely an art form unto itself 🪄
Let's see if we can get the conversation started – hey @Indra @Kevin-C do you have any experience styling email templates? Specifically for Gmail mobile apps? If not do you have any suggestions on additional details @EJackson23 might share to help us better understand?
Thank you very much! – Jaycee