Jump to content

Pattern background on one section in the index page??

Go to solution Solved by tuanphan,

Recommended Posts

Site URL: https://armadillo-polygon-9hxx.squarespace.com/

Hi,

I'm trying to add a background pattern to each of the sections in my site, but nothing seems to do anything. 

This is the code I was trying in the custom CSS section:

 

//they call me special bgpattern:

[data-section-id="a61968be61b95d0428debe6c8"] .section-background {
    background-image: url(https://static1.squarespace.com/static/61968ba483d7c14541409262/t/619fa1922c62ce4f831718e1/1637851538072/Pattern+01.png);
    background-size: cover!important;
    background-repeat: repeat!important;
    background-attachment: scroll!important;
}

 

Nothing is happening. I even tried this code just to change the bg colour, and that also didn't work.

 

//they call me special colour change test:

[data-section-id="a61968be61b95d0428debe6c8"] .section-background {
    background: #000000 !important;
}

 

Any help appreciated. 

Link to comment
  • Replies 5
  • Views 405
  • Created
  • Last Reply

Top Posters In This Topic

I don't know why none of the code is functioning, I also tried to hide the menu on mobile with this code injected to the header, and nothing happens!

<style>
  /* Hide burger */
  button.Mobile-bar-menu {
    visibility: hidden;
}
  /* Hide mobile header */
  .Mobile-bar.Mobile-bar--top {
    display: none;
}
  /* hide footer */
  footer.Footer {
    display: none !important;
}
</style>
Link to comment

Hi Tuanphan, 

...and thank you for your reply! 

I would like to add a pattern to several sections, starting with the section:

section[data-section-id="61968be61b95d0428debe6c8"]

Thank you in advance! 

 

Edited by Aapo
Link to comment
  • Solution
15 hours ago, Aapo said:

Hi Tuanphan, 

...and thank you for your reply! 

I would like to add a pattern to several sections, starting with the section:

section[data-section-id="61968be61b95d0428debe6c8"]

Thank you in advance! 

 

Add to Design > Custom CSS

[data-section-id="61968be61b95d0428debe6c8"] .section-background {
    background-image: url(https://static1.squarespace.com/static/61968ba483d7c14541409262/t/619fa1922c62ce4f831718e1/1637851538072/Pattern+01.png) !important;
}

image.thumb.png.59a35d71b4d4b2544426c7479e78ec07.png

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

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.