Ads

RHartsig
Member

Is there a way to make a CTA/Popup be displayed based on a percentage, rather than pixel?

SOLVE

Hello All

 

My team and I have really been enjoying using Hubspot and its features. We made some popups/CTAs for our website, but have some display issues. Our pop ups will appear differently since so many on our team use screen with different resolutions. I believe this is because CTAs only can be stretched or edited as a pixel, rather than a percentage. I see this while editing images or elements on our Wordpress site here we run into the same isuee. I figured the issue was that the popups are displaying as pixels, so the pop ups will look smaller or larger depending on the resolution of the screen. So, in my mind, this means that we can fix it if the popup/CTA displays as a percentage (of the screen). 

 

Toggling beween boxed with and full width has no change, for reference.


Do you guys know if there is a way to have a popup display as a percentage rather than pixel when stretched to a screen?

0 Upvotes
1 Accepted solution
TomM2
Solution
Thought Leader | Platinum Partner
Thought Leader | Platinum Partner

Is there a way to make a CTA/Popup be displayed based on a percentage, rather than pixel?

SOLVE

Hey @RHartsig not through the template CTAs, you can however create a custom HTML CTA pop-up which will allow you to add in any custom styling you wish. 

You could create a custom HTML CTA with a custom CSS class too and then use your stylesheet to target the CTA and set the width to anything you wish through that. 

Tom Mahon
Technical Consultant | Solutions Engineer | Community Champion
Baskey Digitial

Book a consultation

Did my post help answer your query? Help the community (and me) by marking it as a solution.


View solution in original post

0 Upvotes
3 Replies 3
Vdownload
Member

Is there a way to make a CTA/Popup be displayed based on a percentage, rather than pixel?

SOLVE
 

Yes you can make a CTA/Popup be displayed based on a percentage of the viewport using CSS vw (viewport width) or vh (viewport height) units instead of pixels. This ensures responsiveness across different screen sizes.

0 Upvotes
TomM2
Solution
Thought Leader | Platinum Partner
Thought Leader | Platinum Partner

Is there a way to make a CTA/Popup be displayed based on a percentage, rather than pixel?

SOLVE

Hey @RHartsig not through the template CTAs, you can however create a custom HTML CTA pop-up which will allow you to add in any custom styling you wish. 

You could create a custom HTML CTA with a custom CSS class too and then use your stylesheet to target the CTA and set the width to anything you wish through that. 

Tom Mahon
Technical Consultant | Solutions Engineer | Community Champion
Baskey Digitial

Book a consultation

Did my post help answer your query? Help the community (and me) by marking it as a solution.


0 Upvotes
RHartsig
Member

Is there a way to make a CTA/Popup be displayed based on a percentage, rather than pixel?

SOLVE

Awesome, thank you Tom!