diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css
index 7efe7e1ae3e..679f5f6e3fd 100644
--- a/src/librustdoc/html/static/rustdoc.css
+++ b/src/librustdoc/html/static/rustdoc.css
@@ -179,6 +179,7 @@ nav.sub {
top: 0;
height: 100vh;
overflow: auto;
+ z-index: 1;
}
.sidebar .current {