Centering elements in jQuery Mobile -


does jquery mobile framework have way of centering elements, buttons? looks defaults left-aligning , can't find way (within framework) this.

jquery mobile doesn't seem have css class center elements (i searched through css).

but can write own additional css.

try creating own:

.center-button{   margin: 0 auto; } 

example html:

<div data-role="button" class="center-button">button text</div> 

and see happens. might need set text-align center in wrapping tag, might work better:

.center-wrapper{   text-align: center; } .center-wrapper * {   margin: 0 auto; } 

example html:

<div class="center-wrapper">   <div data-role="button">button text</div> </div> 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -