diff --git a/lib/gallery.common.js b/lib/gallery.common.js index 697a33cb3b..b499a2cdc7 100644 --- a/lib/gallery.common.js +++ b/lib/gallery.common.js @@ -33,6 +33,7 @@ var elh = $(el).height(); var ph = $(this).height(); var nh = (ph - elh) / 2; + if (nh < 1) { var nh = 0; } $(el).css('margin-top', nh); }); };