diff --git a/src/librustdoc/html/static/noscript.css b/src/librustdoc/html/static/noscript.css
index ffa1a7639abb..c9fed989ec04 100644
--- a/src/librustdoc/html/static/noscript.css
+++ b/src/librustdoc/html/static/noscript.css
@@ -23,3 +23,13 @@ rules.
#main .impl-items .hidden {
display: block !important;
}
+
+#main .impl-items h4.hidden {
+ /* Without this rule, the version and the "[src]" span aren't on the same line as the header. */
+ display: flex !important;
+}
+
+#main .attributes {
+ /* Since there is no toggle (the "[-]") when JS is disabled, no need for this margin either. */
+ margin-left: 0 !important;
+}