In order to stop the Active Heading Content from nesting inside Headers, you will need to add a margin before the active heading content.
In order to accomplish this,
- Go to the settings of TOP Table of contents
- Next, click on Headings
- Set the Offset from top to the number of pixels you wish to add before headings.
- It’s done now.
Because you set margin before Headers, the Active Heading Content no longer nests inside them.