diff --git a/docs/_templates/hacks.html b/docs/_templates/hacks.html
index 4763b26b..ba032452 100644
--- a/docs/_templates/hacks.html
+++ b/docs/_templates/hacks.html
@@ -19,6 +19,9 @@
@media screen and (max-width: 1008px) {
div.sphinxsidebar {display: none;}
div.document {width: 100%!important;}
+
+ /* Have code blocks escape the document right-margin. */
+ div.highlight pre {margin-right: -30px;}
}