CMS Development

SusieP3
Participant | Platinum Partner
Participant | Platinum Partner

Email template has added information in all tag IDs and Classes

SOLVE

Hello there,

I'm a web developer who has lately been doing email newsletters for clients and everything has been going well. However I've been doing one for our own agency as of late and find that my CSS isn't being respected once the email is sent (the newsletter looks good in the design tools live preview).

Upon closer inspection I've found that there's been information added in the template's code; specifically inside the IDs and Classes.
hubspot.png

 

 

I'm confused as to where this is coming from. I've done several email templates recently and have never encountered this problem. Why do all my HTML tags have a m_ + random number added in front of the IDs and classes. As it is always the same number throughout a single email, I'm assuming it's the email's ID or something of the sort.

I've tried direct coding these odd identifiers thinking maybe I can workaround this problem, but alas they are unique and change with each new email. I've looked through the forums here and elsewhere but can't find anyone with my problem.

This email template has been created as a drag and drop file, using only hubspot's default modules. The only difference between this file and the past ones I have done is this bit of code that I added in the head markup after I'd seen it suggested to add it from Hubspot.

<!--
  templateType: "email"
  isAvailableForNewContent: true
  enableDomainStylesheets: false
  label: "Newsletter"
-->

I have since removed this, thinking it could be the cause, but the problem persists.

I'd really appreciate your help as I don't know what to do anymore.
Thank you for your time

0 Upvotes
1 Accepted solution
alyssamwilie
Solution
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

Email template has added information in all tag IDs and Classes

SOLVE

Hi @SusieP3 ,

 

I found this post on github that seems to match your issue and it appears to be an email client bug, specifically in the case of this post it's something Gmail was adding when the display of images was disabled.

 

I think the best approach to avoiding problems with this is to make sure all your styles are inline upon send by using Hubspot's hs-inline style id.

<style type="text/css" id="hs-inline-css">
</style>

 

If this answer solved your question, please mark it as the solution.

Alyssa Wilie Profile Image

Alyssa Wilie

Web Developerat Lynton

Learn HubL | Get Marketing Insights

HubSpot Elite Solutions Partner
Lynton's HubSpot theme Rubric now available. Click to download.

View solution in original post

2 Replies 2
alyssamwilie
Solution
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

Email template has added information in all tag IDs and Classes

SOLVE

Hi @SusieP3 ,

 

I found this post on github that seems to match your issue and it appears to be an email client bug, specifically in the case of this post it's something Gmail was adding when the display of images was disabled.

 

I think the best approach to avoiding problems with this is to make sure all your styles are inline upon send by using Hubspot's hs-inline style id.

<style type="text/css" id="hs-inline-css">
</style>

 

If this answer solved your question, please mark it as the solution.

Alyssa Wilie Profile Image

Alyssa Wilie

Web Developerat Lynton

Learn HubL | Get Marketing Insights

HubSpot Elite Solutions Partner
Lynton's HubSpot theme Rubric now available. Click to download.
SusieP3
Participant | Platinum Partner
Participant | Platinum Partner

Email template has added information in all tag IDs and Classes

SOLVE

Thanks for your answer, this is exactly what I needed!

0 Upvotes