Team:Linkoping Sweden/popup

From 2014.igem.org

(Difference between revisions)
 
(One intermediate revision not shown)
Line 16: Line 16:
     display:none;
     display:none;
     z-index:9999;
     z-index:9999;
-
     padding:20px;
+
     padding:20px 0px;
}
}
/* Customize your modal window here, you can add background image too */
/* Customize your modal window here, you can add background image too */
Line 54: Line 54:
             var winH = $(window).height();
             var winH = $(window).height();
             var winW = $(window).width();
             var winW = $(window).width();
 +
            if($(id).height() > winH) {
 +
                $(id).css('height', winH);
 +
            }
 +
            if($(id).width() > winW) {
 +
                $(id).css('width', winW);
 +
            }
             //Set the popup window to center
             //Set the popup window to center
             $(id).css('top', winH/2-$(id).height()/2);
             $(id).css('top', winH/2-$(id).height()/2);

Latest revision as of 09:27, 16 October 2014