CMS Development

AzharBondi
Contributor

Why Buttons are only redirecting to the link when text is clicked ?

SOLVE

Hi, 

 

I am using hubspot buttons in the page editor. 

 

the buttons have pointer (hand cursor) appear but only when I click on the middle of the button (exactly on the text) I am redirected to the link associtaed to that button. 

Otherwise, if I am clicking on any other part of the buttons (that is not the text) redirect doesn't work !

 

Using dev tools, I can see that the text is nested within the link which itself is nested inside the button wrapper

 

AzharBondi_2-1692359320285.png

 


Is there any global/general solution for this that can be applied to all buttons on my page so any part of the button is clickable?

thanks

1 Accepted solution
GRajput
Solution
Key Advisor | Platinum Partner
Key Advisor | Platinum Partner

Why Buttons are only redirecting to the link when text is clicked ?

SOLVE

Hi @AzharBondi 
Anchor (<a>)Tag is an inline element so it may have something to do with its width property. Try using display:block; or display:inline-block; for your button. If you can share your page link or source code, then I can help you out more thoroughly.

 

Hope this will helps you out. Please mark it as Solution Accepted & Upvote to help other Community member.
Thanks!




Gaurav Rajput
Director, MarTech( Growth Natives)

Book a meeting


View solution in original post

0 Upvotes
1 Reply 1
GRajput
Solution
Key Advisor | Platinum Partner
Key Advisor | Platinum Partner

Why Buttons are only redirecting to the link when text is clicked ?

SOLVE

Hi @AzharBondi 
Anchor (<a>)Tag is an inline element so it may have something to do with its width property. Try using display:block; or display:inline-block; for your button. If you can share your page link or source code, then I can help you out more thoroughly.

 

Hope this will helps you out. Please mark it as Solution Accepted & Upvote to help other Community member.
Thanks!




Gaurav Rajput
Director, MarTech( Growth Natives)

Book a meeting


0 Upvotes