# Formatting of titles of collapsed sections

**URL:** <https://pressbooks.community/t/formatting-of-titles-of-collapsed-sections/661>\
**Category:** Developer Questions\
**Created:** [August 27, 2018, 3:10pm UTC](https://pressbooks.community/t/formatting-of-titles-of-collapsed-sections/661 "2018-08-27T15:10:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lrizquierdo](https://pressbooks.community/user_avatar/pressbooks.community/lrizquierdo/32/870_2.png) [@lrizquierdo](https://pressbooks.community/u/lrizquierdo)\
**Post date:** [August 27, 2018, 3:10pm UTC](https://pressbooks.community/t/formatting-of-titles-of-collapsed-sections/661/1 "2018-08-27T15:10:55Z")

</div>

I have an issue trying to format the title of a section when it is collapsed. If I don’t tick “Collapse sections” in McLuhan Theme Options, then I see the title with a tag, as I like it, i.e.:

![48](https://pressbooks.community/uploads/default/optimized/1X/5d873d73f261b1ce26bb03d7b4a4f640627fefda_2_690x67.png)

The CODE tag is implemented by writing the following HTML code:  
`<sup> <span style="background-color: #993300;color: #ffffff"> CODE </span> </sup>`

However, when I tick “Collapse sections”, the style of CODE is gone, i.e.:  
 ![25](https://pressbooks.community/uploads/default/original/1X/19c59b4198e771da4d190311e7a1edb2e830740b.png)

Can anyone suggest a good way of including this “CODE” tag in the title, so it works even when I collapse sections?  
Thanks a lot,  
Luis

BTW, the collapse sections options is absolutely great, but if at some point it could be implemented in a less “all or none” fashion (as per [https://pressbooks.community/t/possibility-of-hiding-showing-content-within-a-chapter/327/13?u=lrizquierdo](https://pressbooks.community/t/possibility-of-hiding-showing-content-within-a-chapter/327/13)), it would be awesome. Thanks a lot

---

<div class="post-metadata">

**Author:** ![ned](https://pressbooks.community/user_avatar/pressbooks.community/ned/32/533_2.png) [@ned](https://pressbooks.community/u/ned)\
**Post date:** [August 27, 2018, 3:28pm UTC](https://pressbooks.community/t/formatting-of-titles-of-collapsed-sections/661/2 "2018-08-27T15:28:08Z")

</div>

Hi @lrizquierdo, I will open a ticket for this.

---

<div class="post-metadata">

**Author:** ![lrizquierdo](https://pressbooks.community/user_avatar/pressbooks.community/lrizquierdo/32/870_2.png) [@lrizquierdo](https://pressbooks.community/u/lrizquierdo)\
**Post date:** [August 27, 2018, 3:58pm UTC](https://pressbooks.community/t/formatting-of-titles-of-collapsed-sections/661/3 "2018-08-27T15:58:27Z")

</div>

Thank you so much @ned !

---

<div class="post-metadata">

**Author:** ![ned](https://pressbooks.community/user_avatar/pressbooks.community/ned/32/533_2.png) [@ned](https://pressbooks.community/u/ned)\
**Post date:** [August 27, 2018, 4:28pm UTC](https://pressbooks.community/t/formatting-of-titles-of-collapsed-sections/661/4 "2018-08-27T16:28:37Z")

</div>

> <https://github.com/pressbooks/pressbooks-book/issues/255>
>
> Prerequisites
> 
> Can you reproduce the behavior you wish to address with all plugins except Pressbooks deactivated?
> Are you running the latest...
