diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css
index 27574e67bc8..c7e38607480 100644
--- a/src/librustdoc/html/static/rustdoc.css
+++ b/src/librustdoc/html/static/rustdoc.css
@@ -171,10 +171,11 @@ nav.sub {
.sidebar {
width: 200px;
- position: absolute;
+ position: fixed;
left: 0;
top: 0;
- min-height: 100%;
+ height: 100vh;
+ overflow: auto;
}
.sidebar .current {