Alex Rivera | Logout

jQuery UI dialog box not positioned center screen

Asked 2009-09-23T16:19:24.133
43

I have a jQuery dialog box that is meant to position in the middle of the screen. However, it seems slightly off-center vertically.

Here is the code:

$('#add_box').dialog({
    autoOpen: true,
    width: 300,
    modal: true,
    resizable: false,
    bgiframe:true
});

Any ideas why this won't center?

Edit
Report

2 Answers

14

I was having the same problem. It ended up being the jquery.dimensions.js plugin. If I removed it, everything worked fine. I included it because of another plugin that required it, however I found out from the link here that dimensions was included in the jQuery core quite a while ago (http://api.jquery.com/category/dimensions). You should be ok simply getting rid of the dimensions plugin.

answered 2011-04-15T15:10:31.867
1

Just solved the same problem, the issue was that i did not imported some js files, like widget.js :)

answered 2011-06-02T11:42:21.753

Your Answer