Jump to content

How do I replace Squarespace's buttons with my own custom css buttons?

Recommended Posts

Posted

I'm trying to replace the default buttons on my template (Sonny) with some custom CSS buttons I have made. I know I can insert them using a code block, but ideally I'd like to be able to insert them using the regular button block, replacing the default ones provided by the template. I have tried targeting the squarespace buttons, however the old button remains and simply gets outlined by my new button.

This is the CSS I current have in my Custom CSS:


 .sqs-block-button {
     border-top: 2px solid #30d2ff;
       background-image: 
           linear-gradient(#30d2ff, blue),
           linear-gradient(#30d2ff, blue);
       background-size:2px 100%;
       background-position:0 0, 100% 0;
       background-repeat:no-repeat;
       border-bottom: 2px solid blue;
       border-radius: 3px;
       color: black;
       background-color: white; 
       display: inline-block;
   }

Am I targeting the wrong element or is what I'm asking impossible?

Thanks in advance.

  • Replies 3
  • Views 11.4k
  • Created
  • Last Reply
Posted

It should be possible but you haven't provided a link to your site (something.squarespace.com).

Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.

Posted

The example above was the following CSS applied to your medium button on your example site. To set medium buttons to look like this, I amended your CSS as follows:


.medium-button-style-outline .sqs-block-button .sqs-block-button-element--medium {
 background-image: linear-gradient(#30d2ff, blue), linear-gradient(#30d2ff, blue);
 background-size:2px 100%;
 background-position:0 0, 100% 0;
 background-repeat:no-repeat;
 border-top: 2px solid #30d2ff;
 border-bottom: 2px solid blue;
 border-radius: 3px;
 color: grey;
 display: inline-block;
 border-width: 2px;
 border-left: 0;
 border-right:0;
 border-style: transparent;
}

.medium-button-style-outline .sqs-block-button .sqs-block-button-element--medium:hover{
 background-color: transparent; /* or other hover color */
 color: black;
}

I hope that helps.

Paul

Like other moderators on this forum, I post answers to help fellow Squarespace users understand how to customise their sites.
If I've correctly answered your question, please Accept the answer by clicking Accept below. If it didn't help, feel free to ask for more help or wait for forum users to add their comments and/or answers.

To everyone else who reads this answer and finds it helpful, please vote it up using the up arrow. This will let other users know it's a good answer.
For more useful Squarespace tips see our website.

Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.

Archived

This topic is now archived and is closed to further replies.

Guest
This topic is now closed to further replies.
×
×
  • 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.