I've been working on adding a fixed sidebar for a table of contents (TOC) to a website, where the sidebar stays in place as the user scrolls up and down.
My implementation includes the following HTML code:
https://i.sstatic.net/jAY8l.png
and CSS code:
https://i.sstatic.net/Z0LZl.png
I took inspiration from a tutorial I found here: https://www.w3schools.com/howto/howto_js_dropdown_sidenav.asp
Although everything appears fine when viewed at 100% zoom in Chrome, I'm facing issues when zooming in further. The sidebar starts to overlap with some of the adjacent content, causing it to hide behind the sidebar. You can see an example of this problem below: https://i.sstatic.net/Q8cwj.png
If anyone has any suggestions on how to correct this issue and ensure that the table of contents functions properly even when zoomed in, your help would be greatly appreciated!