filmov
tv
How use an image for a button background in Squarespace - 7 & 7.1 // Squarespace CSS Tutorial

Показать описание
---
---
---
---
This tutorial was recorded in my 7.1 demo site but also works for older versions of Squarespace!
---
This tutorial will show you how to use an image for a button background in Squarespace. A few important things to note before you copy and paste this into your own site:
→ There is more than one way to do this! This is just one approach of many because code is super customizable.
→ I recommend using an image you upload into your site files so you can make sure you have access to it; using an image hosted by someone else means that the owner could take it down or change it without you knowing, messing up all your hard work!
Here are the steps from the tutorial:
①Upload the image to your Squarespace website (Design → Custom CSS → Custom Files)
② Paste the code below in your Custom CSS (Design → Custom CSS)
③ Replace the text image-url-here with your own image url from the custom files section, making sure to leave the individual quotation marks around the url itself.
④ Pat yourself on the back for creating a unique site with some custom code you rockstar! 🥳
→ Here is the code for small buttons:
.sqs-block-button-element--small{background-color:transparent!important; background-image:url('image-url-here'); background-size:contain!important; background-position:center;background-repeat:no-repeat!important}
→ Here is the code for medium buttons:
.sqs-block-button-element--medium{background-color:transparent!important; background-image:url('image-url-here'); background-size:contain!important; background-position:center;background-repeat:no-repeat!important}
→ Here is the code for large buttons:
.sqs-block-button-element--large{background-color:transparent!important; background-image:url('image-url-here'); background-size:contain!important; background-position:center;background-repeat:no-repeat!important}
→ Add this line of code to make sure the button image won't change opacity on a hover:
Small button
.sqs-block-button-element--small:hover{opacity:1!important; }
Medium button
.sqs-block-button-element--medium:hover{opacity:1!important; }
Large Button
.sqs-block-button-element--large:hover{opacity:1!important; }
→ Add this line of code before the final bracket to give any PNG image a drop shadow, adjusting the px values and color codes to make it match your site style:
filter:drop-shadow(5px 5px 10px rgba(0,0,0,0.8)
---
---
---
---
The term "Squarespace" is a trademark of Squarespace, Inc. This content is not affiliated with Squarespace, Inc. I just really love their platform ♥
---
#squarespace #squarespacecss #howto #customizesquarespace #css #squarespacetricks #squarespacehacks #squarespacetips
---
---
---
This tutorial was recorded in my 7.1 demo site but also works for older versions of Squarespace!
---
This tutorial will show you how to use an image for a button background in Squarespace. A few important things to note before you copy and paste this into your own site:
→ There is more than one way to do this! This is just one approach of many because code is super customizable.
→ I recommend using an image you upload into your site files so you can make sure you have access to it; using an image hosted by someone else means that the owner could take it down or change it without you knowing, messing up all your hard work!
Here are the steps from the tutorial:
①Upload the image to your Squarespace website (Design → Custom CSS → Custom Files)
② Paste the code below in your Custom CSS (Design → Custom CSS)
③ Replace the text image-url-here with your own image url from the custom files section, making sure to leave the individual quotation marks around the url itself.
④ Pat yourself on the back for creating a unique site with some custom code you rockstar! 🥳
→ Here is the code for small buttons:
.sqs-block-button-element--small{background-color:transparent!important; background-image:url('image-url-here'); background-size:contain!important; background-position:center;background-repeat:no-repeat!important}
→ Here is the code for medium buttons:
.sqs-block-button-element--medium{background-color:transparent!important; background-image:url('image-url-here'); background-size:contain!important; background-position:center;background-repeat:no-repeat!important}
→ Here is the code for large buttons:
.sqs-block-button-element--large{background-color:transparent!important; background-image:url('image-url-here'); background-size:contain!important; background-position:center;background-repeat:no-repeat!important}
→ Add this line of code to make sure the button image won't change opacity on a hover:
Small button
.sqs-block-button-element--small:hover{opacity:1!important; }
Medium button
.sqs-block-button-element--medium:hover{opacity:1!important; }
Large Button
.sqs-block-button-element--large:hover{opacity:1!important; }
→ Add this line of code before the final bracket to give any PNG image a drop shadow, adjusting the px values and color codes to make it match your site style:
filter:drop-shadow(5px 5px 10px rgba(0,0,0,0.8)
---
---
---
---
The term "Squarespace" is a trademark of Squarespace, Inc. This content is not affiliated with Squarespace, Inc. I just really love their platform ♥
---
#squarespace #squarespacecss #howto #customizesquarespace #css #squarespacetricks #squarespacehacks #squarespacetips
Комментарии