I've tried various permutations but I my result always splits both tags onto separate lines. Basically I want an input box and along side it, I want a + icon button button (thus the + is not inside the input box, but joined on the right). I suspect some inheriting rules are causing me grief as some examples work as standalone, but fail when inside a grid.
Note, I am fine having the input box and attached plus button being located outside the listview - its just important that the input box and plus are together.
Can anyone help?
Attempt with using controlgroup:
<div class="ui-grid-a">
<div class="ui-block-a">
<div class='ui-body'>
<ul id="base1" class='ui-corner-all' data-role='listview' data-inset='true'>
<li data-role="controlgroup" data-type="horizontal">
<input name="name2" id="name2" class="width100" type="text">
<a href="#" class="ui-btn ui-btn-inline ui-icon-plus ui-btn-icon-notext">+</a>
</li>
<li data-role="list-divider">Available Groups</li>
</ul>
</div>
</div>
<div class="ui-block-b">something else</div>
</div>
Attempt using fieldcontain
<div class="ui-grid-a">
<div class="ui-block-a">
<div class='ui-body'>
<ul id="base1" class='ui-corner-all' data-role='listview' data-inset='true'>
<li class="ui-field-contain">
<input name="name2" id="name2" class="width100" type="text">
<a href="#" class="ui-btn ui-btn-inline ui-icon-plus ui-btn-icon-notext">+</a>
</li>
<li data-role="list-divider">Available Groups</li>
</ul>
</div>
</div>
<div class="ui-block-b">something else</div>
</div>
Why your layout breaks? To restyle a listview, JQM searches for a fixed defined markup chain, for example such as
<ul> <li> <a> <-- main link is restyled as ui-btn <h1></h1> <-- title <p></p> <-- description </a> <a></a> <-- additional link is restyled as split-icon </li> </ul>.So i think you should let JQM do the job and then just override the styles you wish. My proposal is following JQM way-of-life, and is using the split-icon as the right input button you need:
Snippet:
BTW, just an additional hint: please be aware that IMHO your markup with a listview inside a fieldcontain inside a grid is a performance killer, maybe you should rethink a bit the layout.