IE7 is not positioning dialog properly on window resize

Posted by Ergec on Stack Overflow See other posts from Stack Overflow or by Ergec
Published on 2010-03-24T08:51:00Z Indexed on 2010/03/24 8:53 UTC
Read the original article Hit count: 396

Filed under:
|
|
|
|

Like I said, IE7 (and IE6 but I don't really care IE6 that much) doesn't position dialog properly on window resize. When window is re sized, dialog goes down and down. IE8 FF Chrome Safari all work properly and position and re size dialog just fine but IE7 it re sizes the dialog but positions incorrectly. Anybody know some fix about this?

$("#mydialog").dialog({
    autoOpen: false,
    bgiframe: true,
    resizable: false,
    modal: true,
    title: "",
    height: 400,
    overlay: {
        backgroundColor: '#000',
        opacity: 0.5
    }
});
$(window).resize(function(){
    $('#mydialog').dialog("option", "height", $(window).height() - 40);
    $('#mydialog').dialog('option', 'position', 'center');
});
$("#mydialog").dialog("open");

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about dialog