Jump to content

use an png image for a button background

Recommended Posts

Site URL: https://www.pebblesschoolofmotoring.co.uk

 

Im trying to use this bit of code in my design - custom css for using a png image as a button

.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}

i'm getting a message in the code box -expected ')' got '''

I cant see what to change... i have loaded up the png to custom files and slected, deleted andthen selected the file in the custom files box etc. the button has changed to clear.

thanks

 

the password is P388l3s www.pebblesschoolofmotoring.co.uk

Screenshot 2021-02-17 at 15.37.29.png

pebbles-button@4x.png

Link to comment
  • Guest changed the title to use an png image for a button background
  • Replies 1
  • Views 351
  • Created
  • Last Reply

Your code missing some character. Use this code

.sqs-block-button-element--medium {
	background-color: transparent !important; 
	background-image: url('url image here'); 
	background-size: contain !important; 
 	background-position: center;
	background-repeat: no-repeat !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!)

Link to comment

Archived

This topic is now archived and is 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.