Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to center jquery ui buttons?

Adding this to CSS does not work:

.ui-dialog-buttonpane { text-align: center; }  

The buttons are still on the right side.

What should I do?

like image 404
Richard Knop Avatar asked Jan 14 '11 10:01

Richard Knop


2 Answers

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; } 
like image 141
Richard Knop Avatar answered Oct 21 '22 14:10

Richard Knop


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; }  
like image 37
badr slaoui Avatar answered Oct 21 '22 13:10

badr slaoui