CMS Development

si_entology
Member

How do you add a Custom CSS :hover class to a call to action

SOLVE

I've made a cal to action using custom CSS styling, but don't know how to give that C2A a :hover class in the custom CSS field for a call to action. Any Ideas?

0 Upvotes
1 Accepted solution
MFrankJohnson
Solution
Thought Leader

How do you add a Custom CSS :hover class to a call to action

SOLVE

_hubspot-button-accept-as-solution-gif-v00.gif

Help other HubSpot searchers find this post quickly by accepting this solution today.

 

Q: How to add CSS properties to a :hover selector in the custom CSS field for a CTA??

 

Short A: You can't add CSS properties to CSS selectors in the custom CSS field for a CTA.

 

Longer A:

The custom CSS field in CTAs will accept many CSS Properties. However, we haven't seen a successful implementation of CSS Selectors being defined in this section and ':hover' is a CSS selector.

 

The recommended best practice is to either use an existing class or create a custom class for your CTA, then add your CSS properties to the custom class in your CSS stylesheet where the CTA is being used.
(see image)

hubspot-design-default-stylesheets-gif.gif

 

Help answer your question? If so, remember to accept this solution today.

 

Best,
Frank

 


hubspot-solutions-signature-mfrankjohnson-v03.png

www.MFrankJohnson.com

 

Note: Please search for recent posts as HubSpot evolves to be the #1 CRM platform of choice world-wide.

 

Hope that helps.

 

Be well,
Frank


www.mfrankjohnson.com

View solution in original post

0 Upvotes
1 Reply 1
MFrankJohnson
Solution
Thought Leader

How do you add a Custom CSS :hover class to a call to action

SOLVE

_hubspot-button-accept-as-solution-gif-v00.gif

Help other HubSpot searchers find this post quickly by accepting this solution today.

 

Q: How to add CSS properties to a :hover selector in the custom CSS field for a CTA??

 

Short A: You can't add CSS properties to CSS selectors in the custom CSS field for a CTA.

 

Longer A:

The custom CSS field in CTAs will accept many CSS Properties. However, we haven't seen a successful implementation of CSS Selectors being defined in this section and ':hover' is a CSS selector.

 

The recommended best practice is to either use an existing class or create a custom class for your CTA, then add your CSS properties to the custom class in your CSS stylesheet where the CTA is being used.
(see image)

hubspot-design-default-stylesheets-gif.gif

 

Help answer your question? If so, remember to accept this solution today.

 

Best,
Frank

 


hubspot-solutions-signature-mfrankjohnson-v03.png

www.MFrankJohnson.com

 

Note: Please search for recent posts as HubSpot evolves to be the #1 CRM platform of choice world-wide.

 

Hope that helps.

 

Be well,
Frank


www.mfrankjohnson.com
0 Upvotes