Jump to content

Is my syntax wrong when trying to add background image to text block/

Recommended Posts

Posted

I'm using the Montauk template, and I'm trying to add an image to a text block. I used this code in the page header injection section but the image isn't showing up.

block-yui31721156549302369611440 {

background-image: url(https://static1.squarespace.com/static/5d33cdb05cd5ab00015e2209/t/5d4e3f724d46e30001389183/1565409138925/cleansing1.png); padding: 10px;

}Can someone let me know why it's not working? https://sanfordmedispa.com/This is the website for reference, and it's happening on the skincare index page.

  • Replies 4
  • Views 546
  • Created
  • Last Reply
Posted

Are you sure that block ID is exist?

What element on skincare page do you say?

Also, you can use


.css-class-or-id-name {
background-image: url(image-url-paste-here);
background-size: cover;
background-repeat: non-repeat;
background-position: center center;
}




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!)

Posted

Are you sure that block ID is exist?

What element on skincare page do you say?

Also, you can use


.css-class-or-id-name {
background-image: url(image-url-paste-here);
background-size: cover;
background-repeat: non-repeat;
background-position: center center;
}




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!)

Posted

hm I tried that code and it still doesn't work. I'm trying to change the second page on the index where there are 4 icons. (I want to put those icons behind the text.) The code worked on another page, so I think there might be something about this page that's blocking it from working.

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.