diff --git a/_static/custom_html.css b/_static/custom_html.css index 9ff63a8..222a55e 100644 --- a/_static/custom_html.css +++ b/_static/custom_html.css @@ -127,6 +127,7 @@ div.sphinxsidebarwrapper div.logo img.logo { /* Footer(s) */ div.pre-footer { + margin: 20px auto 0 auto; padding: 4px; font-size: 16px; text-align: center; @@ -137,16 +138,6 @@ div.pre-footer a { color: #444; } -div.pre-footer-wide { - width: 940px; - margin: 20px auto 0 auto; -} - -div.pre-footer-narrow { - display: none; - margin: 30px auto 0 auto; -} - /* Fix display on very narrow screens */ div.body { @@ -168,19 +159,30 @@ div.body { left: -3.2rem; } - /* Sidebar text colour */ + /* Sidebar */ + + div.sphinxsidebar { + /* Use alternative way of calculating width/position to avoid white bar at right side */ + position: absolute; + width: 100%; + box-sizing: border-box; + left: 0; + margin-left: 0; + } div.sphinxsidebar ul { color: #fff; } +} + +@media screen and (min-width: 875px) { + /* Use alternative calculations: fix sidebar display in combination with .nav-page-holder */ - /* Footer(s) */ - - div.pre-footer-wide { - display: none; - } - div.pre-footer-narrow { - display: block; + div.sphinxsidebar { + position: absolute; + top: 30px; + left: calc(50% - 470px); + margin-left: 0; } } diff --git a/potheme_html/layout.html b/potheme_html/layout.html index 4629146..0ebd7a7 100644 --- a/potheme_html/layout.html +++ b/potheme_html/layout.html @@ -3,7 +3,9 @@ {%- block document %} {{ super() }} -