Lead Capture Tools

nigeld27
投稿者

Making CTA Image Size Responsive

解決

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 いいね!
1件の承認済みベストアンサー
stefen
解決策
キーアドバイザー | Solutions Partner
キーアドバイザー | Solutions Partner

Making CTA Image Size Responsive

解決

@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

元の投稿で解決策を見る

3件の返信
stefen
キーアドバイザー | Solutions Partner
キーアドバイザー | Solutions Partner

Making CTA Image Size Responsive

解決

@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 いいね!
nigeld27
投稿者

Making CTA Image Size Responsive

解決

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 いいね!
stefen
解決策
キーアドバイザー | Solutions Partner
キーアドバイザー | Solutions Partner

Making CTA Image Size Responsive

解決

@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