Jump to content

Change the background color of an Instagram block on the home page

Recommended Posts

  • Replies 5
  • Views 9.1k
  • Created
  • Last Reply
Posted

Pernilla (@pernillajlilja)

You can add the light grey background to the Instagram block by adding the following Custom CSS to the site:


#collection-56fd2834b654f9cb18e92ab8 {
 .instagram-block {
   background-color: #efefef;
 }
}

The first line means it will only apply to this page (collection....ab8 is the unique name for your blog page).The next two lines change it to the same grey as the site you mentioned - colour #efefef or "gallery".

However, the CSS above will only change the background of the Instagram-block itself. If you want the title "Följ mig gärna på Instagram" to have the same background as it does on the other site, you'll want to add a markdown-block for the title, in place of the text-block. This will allow you to format the text.

Add a markdown block and type the following markdown into it:


<div style="background-color: #efefef; padding: 10px; margin: -17px;">Följ mig gärna på Instagram
</div>

This will give the title the same colour background. The padding adds a little space around it in the same colour.

I hope that helps!Paul

Example with the code:alt text

instragram-background.jpg.79a441017852e67f70dbf466687b8506.jpg

Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.

Posted

You are spot on Paul, (@Paul2009). Thank you!

Do you know why I get a space between the markdown block and the Instagram block? The Instagram block also seems wider.

Best Pernilla

instagram-block.png.22108f41994fbaa26f5fcf0a8375e210.png

Photographer and storyteller

Posted

Sorry, I missed the margin element in the markdown block. I've corrected the answer above. Try that :-)

Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.

  • 2 years later...

Archived

This topic is now archived and is closed to further replies.

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