Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple buttons on right hand side of Header

Tags:

I would like to have more than one button on the right side of the Header bar. The docs say you can customize using a DIV, but when I do that the buttons do not have their normal style. Any advice?

like image 879
Keith Adler Avatar asked May 01 '11 15:05

Keith Adler


People also ask

How do I put the button on the right side of the header?

If you have multiple buttons that you want to align to the right using the class="ui-btn-right" in <a> will place all the buttons on top of each other. Instead you can just wrap a div around it and float to the right.

What is a button header?

Header Buttons allow you to make your header more functional by adding both Icon and Text based buttons to it.


2 Answers

The above example puts more than buttons on the header but they are all positioned to the left of the header. I think you can group your buttons in a controlgroup and position the control the group to the right of the header. Maybe something like this:

    <div data-type="horizontal" data-role="controlgroup" class="ui-btn-right">        //have your button here   </div>

Hope this helps.

like image 111
chepukha Avatar answered Sep 21 '22 10:09

chepukha


This is how I did it, seems clean.

HTML

<div id="myHeader" data-role="header" data-theme="a">     <span class="ui-title"></span>     <div class="ui-btn-right">         <a id="myButton1" class="headerButton" href="#" data-role="button"></a>         <a id="myButton2" class="headerButton" href="#" data-role="button"></a>     </div> </div> 

CSS

.headerButton {     float: left;     margin-right: 5px!important; } 
like image 36
Adam Marshall Avatar answered Sep 18 '22 10:09

Adam Marshall