How to center jquery ui buttons?
Adding this to 开发者_如何学PythonCSS does not work:
.ui-dialog-buttonpane { text-align: center; }
The buttons are still on the right side.
What should I do?
Ok. I also needed to remove the float. This works:
.ui-dialog .ui-dialog-buttonpane {
text-align: center;
}
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
float: none;
}
In my case I also needed to add !important to the float property
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
text-align: center;
float: none !important;
}
Following two classes need to be modified:
.ui-dialog .ui-dialog-buttonpan{
text-align: center !important
}
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
float: none !important;
}
精彩评论