Jump to content

Horizontal Line Colour

Recommended Posts

  • Replies 2
  • Views 863
  • Created
  • Last Reply
5 hours ago, LeeLee said:

I want to change the colour of some horizontal lines. However I only want to change some on the page (different pages within an index page) how do I make the code specific to a specific line only? 

Hi Lee

You can add an additional selector that refers to the ID of each section of your index page. To refer to an ID, you prefix it with '#'.

For example, your site has an index page with a section called "services-" and a section called "beverages" so you could use this Custom CSS to choose different colours for the lines in each of these sections:

#services- .sqs-block-horizontalrule hr {
  background-color: #4191AE;
}

#beverages .sqs-block-horizontalrule hr {
  background-color: #97548F;
}

Notes:
1. This works on Brine-family templates where each section is automatically assigned an ID that matches the section URL.

   If a post helps you, please click a "Like" option below  ↘️

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

Link to comment

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.