Try this link to set the percentage height.
$(document).ready(function() { $('#testColorBox').click(function() { var wWidth = $(window).width(); var dWidth = wWidth * 0.8; var wHeight = $(window).height(); var dHeight = wHeight * 0.8; var $link = $(this); var $dialog = $('<div></div>') .load('test.html') .dialog({ autoOpen: false, modal: true, title: $link.attr('title'), overlay: { opacity: 0.1, background: "black" }, width: dWidth, height: dHeight, draggable: false, resizable: false }); $dialog.dialog('open'); return false; }); });
ravisolanki07
source share