diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css
index 42e4fa05152..00045bf23d3 100644
--- a/src/librustdoc/html/static/rustdoc.css
+++ b/src/librustdoc/html/static/rustdoc.css
@@ -1570,7 +1570,10 @@ h4 > .notable-traits {
height: 73px;
}
- #main {
+ /* This is to prevent the search bar from being underneath the
+ * element following it.
+ */
+ #main, #search {
margin-top: 100px;
}