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

How to right align a button in a listview item

1 Answer 206 Views
Button (Mobile)
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 08 May 2014, 03:04 PM
I have a button inside a listview item, and I do not want it to occupy the whole width of the item. I want to fix the width and right align the button.
I have tried using data-align="right" but that does not help, the button remains left aligned

Here is my code

<ul>
   <li><a data-role="button" data-rel="modalview" href="#modalview-loanamount" id="modalview-open-button">Help</a></li>
</ul>
 
<style scoped>
    #modalview-open-button {
        width:5em;
    }
</style>

1 Answer, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 09 May 2014, 12:08 PM
Hello Aleksandar,

You can just float the buttons to the right like this:

http://jsbin.com/raneq/1/edit

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Button (Mobile)
Asked by
Alex
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Share this question
or