# ToC not working when headers are inside a div?

**URL:** https://meta.discourse.org/t/toc-not-working-when-headers-are-inside-a-div/276615
**Category:** Support
**Tags:** disco-toc
**Created:** [September 6, 2022, 8:35pm UTC](https://meta.discourse.org/t/toc-not-working-when-headers-are-inside-a-div/276615 "2022-09-06T20:35:51Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [August 25, 2023, 2:35pm UTC](https://meta.discourse.org/t/toc-not-working-when-headers-are-inside-a-div/276615/4 "2023-08-25T14:35:15Z")

</div>

It depends on what you try to achieve with your other HTML content.

I crosspost a potential workaround: [TOC doesn't work when wrapped with HTML tags - #2 by Canapin](https://meta.discourse.org/t/toc-doesnt-work-when-wrapped-with-html-tags/276325/2)

---

_[View the full topic](https://meta.discourse.org/t/toc-not-working-when-headers-are-inside-a-div/276615)._
