Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0
pernillajlilja

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

Question

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!

Edited by pernillajlilja
Initial Revision

Photographer and storyteller

Share this post


Link to post

5 answers to this question

Recommended Posts

  • 0

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

Edited by Paul2009

World-class Squarespace Developer and Squarespace Circle Leader with a strong reputation on the Squarespace Forum.
I'm trusted by hundreds of Squarespace users worldwide, including designers, freelancers, business owners and big agencies.

I can tackle anything from small tweaks to full websites and I'm available for short and long bookings (min. 1 hour).
Book via my website giving as much notice as possible. Note that I'm usually booked six weeks in advance for jobs longer than an hour.
Prebuilt Squarespace Extensions
Custom Squarespace Extensions: Tell me about the functionality you need

 

Share this post


Link to post
  • 0

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

Share this post


Link to post
  • 0

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


World-class Squarespace Developer and Squarespace Circle Leader with a strong reputation on the Squarespace Forum.
I'm trusted by hundreds of Squarespace users worldwide, including designers, freelancers, business owners and big agencies.

I can tackle anything from small tweaks to full websites and I'm available for short and long bookings (min. 1 hour).
Book via my website giving as much notice as possible. Note that I'm usually booked six weeks in advance for jobs longer than an hour.
Prebuilt Squarespace Extensions
Custom Squarespace Extensions: Tell me about the functionality you need

 

Share this post


Link to post
Guest
This topic is now closed to further replies.

×
×
  • Create New...