开发者

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;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜