Jump to content

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

Recommended Posts

Hi! Can I change the background color of my Instagram block on my home page? http://jangendahllilja.com/

I'd like to have a light grey background color on the Instagram block, to separate it from the other blocks on the home page. Similar to the one on the bottom of this page: http://jasminestar.com/blog/.

I am CSS illiterate. Any help much appreciated. Many thanks!

Photographer and storyteller

Link to comment
  • Replies 5
  • Created
  • Last Reply

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

Improve your online store with our extensions.
About: Squarespace Circle Leader since 2017. I value honesty, transparency, appreciation and great design ♥.
Work: Squarespace Developer and founder of SF Digital, building the features Squarespace didn't include™.
Content: Links in my posts may refer to SF Digital products or may be affiliate links.

Buy me a coffee

Link to comment

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

Improve your online store with our extensions.
About: Squarespace Circle Leader since 2017. I value honesty, transparency, appreciation and great design ♥.
Work: Squarespace Developer and founder of SF Digital, building the features Squarespace didn't include™.
Content: Links in my posts may refer to SF Digital products or may be affiliate links.

Buy me a coffee

Link to comment
  • 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.