diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-01-06 09:38:40 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-01-06 09:38:40 +0000 |
commit | b21215d2e601f07a43e172735dabbf7aec6f4638 (patch) | |
tree | 51b39a22a145741ea303ec4e0eacb8b6b0ce5144 | |
parent | 393273eaef4798cb4d03c73c4853edfb5903608b (diff) |
use "position: fixed" to keep the dialog centered in the viewport.
-rw-r--r-- | lib/gallery.dialog.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/gallery.dialog.js b/lib/gallery.dialog.js index 70f577c5..175f2a42 100644 --- a/lib/gallery.dialog.js +++ b/lib/gallery.dialog.js @@ -54,7 +54,8 @@ function openDialog(element, on_success) { if (parent.width() < 400) { parent.css("width", 400); } - parent.css({"top": $(window).height() / 2 - parent.height() / 2, + parent.css({"position": "fixed", + "top": $(window).height() / 2 - parent.height() / 2, "left": $(window).width() / 2 - parent.width() / 2, "opacity": "1.0" }); |