Jump to content

Horizontal Line Colour

Recommended Posts

  • Replies 2
  • Views 975
  • 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  ↘️

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.

Would you like your customers to be able to mark their favourite products in your Squarespace store?

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.