diff --git a/share/previews.js b/share/previews.js
index <HASH>..<HASH> 100644
--- a/share/previews.js
+++ b/share/previews.js
@@ -49,7 +49,8 @@ var getContentHeight = (function() {
     var els = bodyEl.getElementsByTagName('*');
     var elHeights = [];
     for (var i = 0, l = els.length; i < l; i++) {
-      elHeights.push(els[i].offsetTop + els[i].offsetHeight);
+      elHeights.push(els[i].offsetTop + els[i].offsetHeight +
+        parseInt(window.getComputedStyle(els[i], null).getPropertyValue('margin-bottom')));
     }
     var height = Math.max.apply(Math, elHeights);
     height += parseInt(bodyStyle.getPropertyValue('padding-bottom'), 10);
Include bottom margin of last element in document height calculation