New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TOC runs off the page for long documents #204
Comments
may i know what theme this is? it can probably be fixed via css, by setting the overflow attribute |
This is the same across all bootstrap / bootswatch theme. I had this issue with mdwiki also so I know it is not specific to mkdocs. It is requires a change to the bootstrap/bootswathc theme. For example, add this to a new line of the
Add this on a new line, save.
Refresh page. |
I don't see it happening at least with the readthedocs theme. The navigation items are in a scrollable list. The readthedocs theme is more suitable if there are many articles in the navigation than the mkdocs theme, which uses (non-scrollable) menu dropdowns at the top. |
(To be clear, this is a problem with the table of contents, not the drop down menus. There is an issue for the navbar here: #210) This happens on every theme except readthedocs. I tried to set Here is an example, it is easy to reproduce if you just copy and paste a section a ton of times to make the TOC really long. |
This will now be handled in the theme repos. mkdocs/mkdocs-bootswatch#2 and mkdocs/mkdocs-bootstrap#3 |
Presumably we have the issue for the built-in |
I think somebody fixed it for MkDocs. But I am not 100% sure. |
Confirmed. This is still an issue on the mkdocs theme. |
I've tried adding the following CSS to .bs-sidebar {
overflow-y: auto;
max-height: 100%;
} You can view my result here: https://notes.shichao.io/apue/ch8/ |
@d0ugal Hey! Really impressed with mkdocs as a whole, a really cool project, with really nice documentation! 😃 In #696, I just wanted to add that perhaps using the viewport height to size the .bs-sidebar.well {
padding: 0;
max-height:85vh;
overflow-y: auto;
} This results in a pretty nicely sized sidebar that grows proportionally with the window. |
@jamesadevine Interesting. I wasn't aware of vh units. It looks like IE and Edge only partially support this which is a concern and I don't have access to either to test it out. Happy to accept a pull request if you are able to test on IE and provide screenshots before/after. |
Although, it looks like they they both support |
@d0ugal happy to oblige, I will make a pull request when I have a sec 😃 I will also provide screenshots of before and after for verification. |
If you have enough parts in your document, the TOC becomes taller than the screen and sections can't be accessed. Is there something I can configure?
The text was updated successfully, but these errors were encountered: