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?
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.
Header Buttons allow you to make your header more functional by adding both Icon and Text based buttons to it.
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.
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; }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With