Jump to content

[Share] Bold Title when Accordion is Open

Recommended Posts

Posted

You can use this code to Website Tools > Custom CSS.

li[data-is-open="true"] span.accordion-item__title {
    font-weight: bold;
}

image.png.fed617ff1f0ccf3bf38b066930660711.png

Result

image.png.348d099d1ecc39a46a126ebac1594962.png

If you want to apply this for specific accordion block. First you need to find Accordion Block ID.

In my example, it is: #block-yui_3_17_2_1_1729387285192_9027

image.png.7debbb4686e0c0eb462d783990a14c65.png

Next, use this CSS code

#block-yui_3_17_2_1_1729387285192_9027 li[data-is-open="true"] span.accordion-item__title {
    font-weight: bold;
}

image.png.1636bbafc73445b80b949a4f49f00dcf.png

If you want to apply this for specific accordion – but specific item. We will need to use CSS code like this

#block-yui_3_17_2_1_1729387285192_9027 li[data-is-open="true"]:nth-child(2) span.accordion-item__title {
    font-weight: bold;
}

image.png.b3374c5b1f0fb7a6c8bcb6e68621e9c3.png

this will bold accordion item 2 title only

image.png.5ebafaed576806012e832a2385ebd92b.png

In case you want to make underline, instead of bold, just replace

font-weight: bold;

with

text-decoration: underline;

image.png.0c8da4d193172e09673e276b41cb04ff.png

result

image.png.ed358139ef3acde4e827c47e60fa4eeb.png

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!)

  • Replies 0
  • Views 320
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

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.