Jump to content

Changing the button content on hover

Go to solution Solved by abbiericher,

Recommended Posts

Hey group!
 

I would like to change my button content when on hover. I know it is possible, but I cant find a proper snippet for it to works on my clients website.

Here is the code I used:

.large-button-shape-rounded .sqs-block-button .sqs-block-button-element--large:hover::before { 
  content: "voir le forfait"!important; 
} 

And here are the buttons I would like to apply the changes:

image.thumb.png.85b2f25de7baf833b19e66c5bab6ca31.png

 

website: https://alau-site-web.squarespace.com/
password: freelance

Thank you!

Link to comment
  • Replies 2
  • Views 1.1k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

You need to make text blue on hover, and position ::before absolutely:

.sqs-block-button .sqs-block-button-element--large:hover {
  color: var(--secondaryButtonBackgroundColor);
}

.sqs-block-button .sqs-block-button-element--large:hover::before { 
  content: "voir le forfait"!important; 
    color: white;
  position: absolute; 
  top: 50%;
  left: 50%;
  transform: translate3d(-50%, -50%, 0);
} 

 

Link to comment
  • Solution
18 hours ago, nick_sh said:

You need to make text blue on hover, and position ::before absolutely:

.sqs-block-button .sqs-block-button-element--large:hover {
  color: var(--secondaryButtonBackgroundColor);
}

.sqs-block-button .sqs-block-button-element--large:hover::before { 
  content: "voir le forfait"!important; 
    color: white;
  position: absolute; 
  top: 50%;
  left: 50%;
  transform: translate3d(-50%, -50%, 0);
} 

 

Awesome! It works! Thank you so much 🙂

Link to comment

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.