Jump to content

Adding background color behind two words of text

Recommended Posts

Hi there! On each product on my site there is a "Size Chart" to help the customer pick what size they need. This is getting overlooked because it blends in with the other text (top of screenshot) so I was wondering if I could add a green background to the text with custom code (bottom of screenshot)? The "Size Chart" is on all of the product pages so hoping the code can apply to all of the pages. Thanks!

Screenshot 2023-12-14 at 12.03.45 PM.png

Link to comment
  • Replies 3
  • Views 1.5k
  • Created
  • Last Reply

Top Posters In This Topic

  • 1 month later...
On 1/18/2024 at 8:26 PM, miche23 said:

You can add this code to Website Tools (under Not Linked) > Custom CSS

div.ProductItem-details-excerpt p a[href*="Size-Chart"] {
    background-color: #b1c852 !important;
    color: black !important;
    text-decoration: none !important;
    padding: 5px !important;


Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

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.