I'm a newbie in Sphinx and CSS. Basically when I try to automatically generate the documentation by simply adding 'modules' to default conf.py and using sphinx_rtd_theme, I get too long names (fully qualified domain name) on the sidebar that are not fully displayed because of short sidebar's width.
Is there any way to solve this issue? Adding a horizontal scrollbar? Or enlarge the sidebar's width? Or?
The easiest way to arrange the lateral navigational menu is to use custom CSS to enable horizontal scroll-bar.
The steps to do that are few:
Classic
theme the name is sphinxsidebarwrapper
;_static
folder add a new file called custom.css
(or other name if you want). If you have one folder for build
and one for source
(depends on choice made during sphinx-quickstart), use the _static
folder in source
folder.
The CSS file have to contain only one rule:
.sphinxsidebarwrapper { overflow-y: scroll; }
conf.py
the line below, after html_static_path = ['_static']
:
html_css_files = ["custom.css"]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With