diff --git a/cssbox.css b/cssbox.css
index f865094..ec6cdbb 100644
--- a/cssbox.css
+++ b/cssbox.css
@@ -18,6 +18,11 @@
 }
 
 .cssbox > div {
+  height: 100%;
+  width: 100%;
+}
+
+.cssbox > div > div {
   margin-top: -2.5em;
   position: relative;
   color: rgba(27,54,81,0.8);
diff --git a/cssbox.theme.inc b/cssbox.theme.inc
index 607037f..e6d6122 100644
--- a/cssbox.theme.inc
+++ b/cssbox.theme.inc
@@ -131,11 +131,13 @@ function theme_cssbox_popup($variables) {
 
   $output = ''
   . '<div class="cssbox" id="' . $variables['id'] . '">'
+    . '<div>'
     . '<img src="' . $variables['image'] . '" alt="' . $variables['caption'] . '">'
     . '<a href="#' . $target . '" class="cssbox-close">' . t($close) . '</a>'
     . (!empty($variables['prev']) ? '<a href="#image-' . $variables['prev']['fid'] . '" class="cssbox-prev">' . t($prev) . '</a>' : '')
     . (!empty($variables['next']) ? '<a href="#image-' . $variables['next']['fid'] . '" class="cssbox-next">' . t($next) . '</a>' : '')
     . (!empty($variables['caption']) ? '<div><p>' . $variables['caption'] . '</p></div>' : '')
+    . '</div>'
   . '</div>';
 
   return $output;
