Jump to content

Customising buttons using CSS - hover position change and hover background management

Recommended Posts

Posted

Hello,

I am trying to achieve a specific set of adjustment for a button when hovering.

My vision is when hovering the button will change colour, slightly move down in position, maintain the transparent background and do so with a smooth transition.

I have not yet had any luck making any CSS adjustments to the buttons so any advice, guidance or code would be greatly appreciated.

Thanks!  

 

  • Replies 2
  • Views 1.4k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Posted

Website: https://www.hughsando.co/

File attached showing the button location, without hover the text is transparent.

 

Current CSS

.sqs-block-button-element:hover {
  text-color: #404040; 
  transform: translateY(-5px);
  transition: 0.7s;
}

 

I would like the standard text color to be #f2f2f2 and change on hover similar to that above.

I currently cannot get any CSS to work on the button, is there an obvious flaw I am missing? 

Screenshot 2024-01-17 at 9.50.39 am.png

Posted
On 1/17/2024 at 8:55 AM, sando said:

Website: https://www.hughsando.co/

File attached showing the button location, without hover the text is transparent.

 

Current CSS

.sqs-block-button-element:hover {
  text-color: #404040; 
  transform: translateY(-5px);
  transition: 0.7s;
}

 

I would like the standard text color to be #f2f2f2 and change on hover similar to that above.

I currently cannot get any CSS to work on the button, is there an obvious flaw I am missing? 

Screenshot 2024-01-17 at 9.50.39 am.png

You can use this CSS code

div#block-yui_3_17_2_1_1682815228849_115651 a {
    color: #f2f2f2 !important;
}
div#block-yui_3_17_2_1_1682815228849_115651 a:hover {
    color: #404040 !important;
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.