Jump to content

How to style button background?

Recommended Posts

Paste this into Custom CSS:

#block-641d470bad8b37cf62c1 .sqs-block-button-element, #block-761859652cd22c0a5970 .sqs-block-button-element {
  background-color: #25503f !important;
}

or this into the page's header code injection:

<style>
  #block-641d470bad8b37cf62c1 .sqs-block-button-element, #block-761859652cd22c0a5970 .sqs-block-button-element {
  background-color: #25503f !important;
}</style>

This code is specific to those two purchase buttons. If they are deleted or you add a new purchase button, this code will have to be updated with new block IDs.

 

Alternatively you could add your button via a code block, and set the class to "purchase-button" and style it with CSS.  

To make the first purchase button, add a code block and replace the sample code with:

<a href="https://uncommonpursuit.memberful.com/checkout?plan=86205"><btn class="sqs-block-button-element--medium sqs-button-element--primary sqs-block-button-element purchase-button">Purchase - $15</btn>
</a>

Notice the href is the link to your first purchase page. Then, add a second code block to make the second button by pasting code:

<a href="https://uncommonpursuit.memberful.com/checkout?plan=86210"><btn class="sqs-block-button-element--medium sqs-button-element--primary sqs-block-button-element purchase-button">Purchase - $15</btn>
</a>

Finally, head to Custom CSS and paste the following to assign the color to your newly created class of buttons: 

.purchase-button {
  background-color: #25503f !important;
}

Now, if you ever want to change the color or style of just your purchase buttons, you can do it here in CSS!

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.