Jump to content

Change the background color of underlined text with CSS

Go to solution Solved by Jia,

Recommended Posts

Hi!

 

I would like to "mark" some text inside of the accordion block I got on my project pages (I want to highlight my own name). I've been trying to make it work with CSS, but couldn't get it to work. I've underlined my name in the credits section, to give it a different class inside the code and than go on from there, but I can't get it to work. Does anyone have any idea?

Ideally I want to change all of the underlined text in accordion blocks with the CSS code, instead of using different div ids, so it automatically applies to all underlined text in accordion blocks on my website.

 

website: https://www.bartseijbel.nl

 

Thanks!

Link to comment
  • Replies 1
  • Views 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

  • Solution
5 hours ago, bartseijbel said:

Hi!

 

I would like to "mark" some text inside of the accordion block I got on my project pages (I want to highlight my own name). I've been trying to make it work with CSS, but couldn't get it to work. I've underlined my name in the credits section, to give it a different class inside the code and than go on from there, but I can't get it to work. Does anyone have any idea?

Ideally I want to change all of the underlined text in accordion blocks with the CSS code, instead of using different div ids, so it automatically applies to all underlined text in accordion blocks on my website.

 

website: https://www.bartseijbel.nl

 

Thanks!

Hi, try this code. It targets all underlined text in descriptions of accordion blocks.

.sqs-block-accordion .accordion-item__description span {
    background-color: yellow;
}

 

Please give this a 👍 if it helps. Make sure to quote me or tag me in your reply, otherwise I won't be notified.

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.