Jump to content

Change certain text colour

Recommended Posts

Hello!

 

Ive designed a website geotruckin.co.uk and would like to change 3 lines of text red (service page, bottom 3 lines) without changing the whole design.

 

Ive found out the only way to do it is through the Advanced settings with coding, however I don't know much about that.

 

Does anyone have any advice or know how to do it?

 

Thanks for your help! 🙌

 

 

Screenshot 2019-10-22 at 20.07.44.png

Link to comment
  • Replies 2
  • Views 494
  • Created
  • Last Reply

Sure thing. Insert the following via the CSS Editor:

#block-yui_3_17_2_29_1458571213353_7660 .sqs-block-content > *:nth-last-child(-n+4) {
  color: red;
}

It uses the Squarespace block ID, and targets the last 4 elements that are direct children of the block's content. Note that this targets the last 4 (not the last 3) because you have an empty paragraph between the first two lines and the last line, for a total of 4 elements. If you were to mess with the text at the end of that text block too much, you'll find the rule will have to be rewritten a bit.

-Brandon

If a response helped you out, send a 'Like' 👍 (bottom-right) and/or 'Upvote' vote.jpg.c260784ece77aec852b0e3049c77a607.jpg (top-left)

Link to comment
  • 2 weeks later...

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.