diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css
index 679f5f6e3fde9b2fe0fc8c6ad82b69d6d0507c35..f32252b726c8fe23349ce86c06dc44e0afe34059 100644
--- a/src/librustdoc/html/static/rustdoc.css
+++ b/src/librustdoc/html/static/rustdoc.css
@@ -179,7 +179,6 @@ nav.sub {
top: 0;
height: 100vh;
overflow: auto;
- z-index: 1;
}
.sidebar .current {
@@ -273,9 +272,19 @@ nav.sub {
overflow: auto;
padding-left: 0;
}
+
#search {
margin-left: 230px;
+ position: relative;
+}
+
+#results {
+ position: absolute;
+ right: 0;
+ left: 0;
+ overflow: auto;
}
+
.content pre.line-numbers {
float: left;
border: none;