I’m using Jquery mobile popup and want to display a form in a popup.
I want to display the text label and text box in the same line. So, I use div with fieldcontain around it.
It works outside of popup but not inside.
<a href="#popupBasic" data-rel="popup">Open Popup</a>
<div data-role="popup" id="popupBasic">
<div data-role="fieldcontain">
<label for="input"> Fieldname </label>
<input type="text" id="input" value="" />
</div>
</div>
<div data-role="fieldcontain">
<label for="input"> Fieldname </label>
<input type="text" id="input" value="" />
</div>
See this jsfiddle: http://jsfiddle.net/B3pyG/
I wonder if this is a limitation of popup.
It looks like Field Containers are hampered by the styling used for Popups. I tried with their Form example: http://jsfiddle.net/Twisty/BrsR2/
HTML
The Popup wrapper seems to pull everything in and wrap as much as it can. They talk about it in documentation:
You could get around this by making a box for the label and floating the Input the right. Something like: