Lead Capture Tools

nigeld27
Colaborador

Making CTA Image Size Responsive

resolver

Hello,

 

 

We have embedded our Hubspot CTA into a webpage which isn't built on Hubspot. The CTA is working perfectly except for one factor: the size isn't responsible.

 

Is it possible to make an image CTA responsible? This Knowledge page below suggests that it is possible: If you are embedding an image CTA on your non-HubSpot site, you may need to apply additional CSS declarations (such as width: 100%;) within your stylesheet to make the image CTA responsive.

 

Perhaps this question should be posted in the CMS part of the Community but I can't seem to work out which bit of the CMS codes to change. I'm making changes but it doesn't seem to change anything. I even changed the HTML embed code to say 100% but that isn't working.

 

Can anyone help, please? 

 

0 Me gusta
1 Soluciones aceptada
stefen
Solución
Asesor destacado | Partner
Asesor destacado | Partner

Making CTA Image Size Responsive

resolver

@nigeld27 you'll want to add those styles to your website where the CTA is being embedded. Also, if you don't want to affect any other images on your website you could pinpoint the "hs-cta-img" class like so:

.hs-cta-img {
  max-width: 100%;
  height: auto;
}
Stefen Phelps, Community Champion, Kelp Web Developer

Ver la solución en mensaje original publicado

3 Respuestas 3
stefen
Asesor destacado | Partner
Asesor destacado | Partner

Making CTA Image Size Responsive

resolver

@nigeld27 do you have a link? Typically, all you would need the following CSS:

img {
  max-width: 100%;
  height: auto;
}
Stefen Phelps, Community Champion, Kelp Web Developer
0 Me gusta
nigeld27
Colaborador

Making CTA Image Size Responsive

resolver

Thanks Stefan, that's helpful. I hate to sound like completely ignorant but do I change that in the Hubspot embed code or in our website/platform?

0 Me gusta
stefen
Solución
Asesor destacado | Partner
Asesor destacado | Partner

Making CTA Image Size Responsive

resolver

@nigeld27 you'll want to add those styles to your website where the CTA is being embedded. Also, if you don't want to affect any other images on your website you could pinpoint the "hs-cta-img" class like so:

.hs-cta-img {
  max-width: 100%;
  height: auto;
}
Stefen Phelps, Community Champion, Kelp Web Developer