diff --git a/IPython/html/static/edit/js/main.js b/IPython/html/static/edit/js/main.js
index 4a2731082..b7f234ab6 100644
--- a/IPython/html/static/edit/js/main.js
+++ b/IPython/html/static/edit/js/main.js
@@ -79,16 +79,11 @@ require([
// Make sure the codemirror editor is sized appropriatley.
var _handle_resize = function() {
- var header = $('#header');
+ var backdrop = $("#texteditor-backdrop");
- // The header doesn't have a margin or padding above it. Calculate
- // the lower margin&padding by subtracting the innerHeight from the
- // outerHeight.
- var header_margin_bottom = header.outerHeight(true) - header.innerHeight();
-
- // When scaling CodeMirror, subtract the header lower margin from the
- // height twice. Once for top padding and once for bottom padding.
- $('div.CodeMirror').height(window.innerHeight - header.height() - 2*header_margin_bottom);
+ // account for padding on the backdrop wrapper
+ var padding = backdrop.outerHeight(true) - backdrop.height();
+ $('div.CodeMirror').height($("#site").height() - padding);
};
$(window).resize(_handle_resize);
diff --git a/IPython/html/static/edit/less/edit.less b/IPython/html/static/edit/less/edit.less
index 99d07884f..2413fdc7e 100644
--- a/IPython/html/static/edit/less/edit.less
+++ b/IPython/html/static/edit/less/edit.less
@@ -10,7 +10,6 @@
padding-bottom: @page-header-padding;
@media not print{
- min-height: @page-backdrop-height;
background-color: @page-backdrop-color;
}
@@ -27,7 +26,6 @@
@media not print{
padding: 0px;
background-color : @page-color;
- min-height: @page-min-height;
.box-shadow(@global-shadow);
}
}
diff --git a/IPython/html/static/style/style.min.css b/IPython/html/static/style/style.min.css
index fccb613e1..0ffd1c9cf 100644
--- a/IPython/html/static/style/style.min.css
+++ b/IPython/html/static/style/style.min.css
@@ -8878,7 +8878,6 @@ ul#new-menu {
}
@media not print {
#texteditor-backdrop {
- min-height: 100vh;
background-color: #eeeeee;
}
}
@@ -8898,7 +8897,6 @@ ul#new-menu {
#texteditor-backdrop #texteditor-container {
padding: 0px;
background-color: #ffffff;
- min-height: 0;
-webkit-box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2);
box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2);
}