This is a migrated thread and some comments may be shown as answers.

Center a button

1 Answer 30 Views
General Discussion
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
sitefinitysteve asked on 03 Aug 2014, 02:07 AM
How do you go about centering a button?  margin: auto doesn't seem to do anything, the button just sticks to the right side of the screen

1 Answer, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 06 Aug 2014, 02:11 PM
Hi Steve,

You can use the Kendo Mobile Button styled as shown in this demo:
Mobile Button / Events

Additionally, if you do not want to use the Kendo Mobile button, here is one way to declare a centered button. Make sure that you set "display:block" in addition to the "margin:auto" setting:

<button style="margin-left:auto; margin-right:auto; display:block;">Button</button>


Regards,
Tsvetina
Telerik
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
Tags
General Discussion
Asked by
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
Answers by
Tsvetina
Telerik team
Share this question
or