Fix: jQuery UI Dialog Align Bug on Google Chrome

by heru on December 30, 2010

We have recently found out that there is an alignment bug on the “Dialog” feature of jQuery UI on Google Chrome.

In the picture below, you notice that the Dialog window appears to be aligned on the left instead of in the center in Google Chrome.

It turns out that there is a quick fix around this. Simply add the following CSS style:

1
.ui-dialog { margin-left:auto; margin-right:auto; }

Basically, what it does, it will just set both left and right to be of equal values and thus, putting the Dialog back in the center! *Yippeee!*

Related Posts

  • No Related Post

Previous post:

Next post: