I want a dialog to have a max height setting but, if the content is smaller, then to shrink down to do what height = \'auto\'
does. Is this possible in JQuery UI di
Let me throw my 2 cents in.
Create a CSS Style like so
.d-maxheight { max-height:200px; }
Now simply tell the dialog to apply that class to the dialog
$(document).ready(function(){
$(d).dialog({
dialogClass: 'd-maxheight',
height:400
});
});
Here is an example in jsbin
As long as you content is less than the max height it will automatically size. If not the max height will take effect and you will get a scroll bar inside the dialog.