Jump to content

Horizontal Line Colour

Recommended Posts

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  ↘️

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • 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.