html - How do I get a label on the same line as a Datebox input field? -
this embarrasing. im making use of datebox module , i'm trying align label next input examples in provided link.
i'm expecting along lines of this:
but this:
this html:
<div name="activities" id="activities"> <label for="activity-1">activity 1</label> <input name="activity-1" id="activity-1" type="date" data-role="datebox" data-options='{"mode": "durationflipbox", "overridedurationorder": ["h","i"], "overridedurationformat": "%dl:%dm"}'/> </div>
i've tried setting styles in css
#activities { display: inline-block; vertical-align: right; }
but i'm not getting expected result given above.
what doing wrong?
update seems html being inserted when loading page final result looks this:
i apologize inserting image instead of code, can't seem copy html in legible way.
anyway, here if want copy/paste it:
<div name="activities" id="activities"> <label for="activity-1" class="ui-input-text" style="vertical-align: middle;">activity 1</label> <div class="ui-input-text ui-shadow-inset ui-corner-all ui-btn-shadow ui-body-c"><div class="ui-input-datebox ui-corner-all ui-body-c" style="border: none;"><input name="activity-1" id="activity-1" type="text" data-role="datebox" data-options="{"mode": "durationflipbox", "overridedurationorder": ["h","i"], "overridedurationformat": "%dl:%dm"}" class="ui-input-text ui-body-c" readonly="readonly"><a href="#" class="ui-input-clear ui-btn ui-btn-up-c ui-shadow ui-btn-corner-all ui-btn-icon-notext" title="open date picker" data-corners="true" data-shadow="true" data-iconshadow="true" data-wrapperels="span" data-icon="grid" data-iconpos="notext" data-theme="c" style="vertical-align: middle; display: inline-block;"><span class="ui-btn-inner"><span class="ui-btn-text">open date picker</span><span class="ui-icon ui-icon-grid ui-icon-shadow"> </span></span></a></div></div> </div>
your code works me: http://jsfiddle.net/lera/heehd/ browser using?
i can same results without css. html:
<div name="activities" id="activities"> <label for="activity-1">activity 1</label> <input name="activity-1" id="activity-1" type="date" data-role="datebox" data-options='{"mode": "durationflipbox", "overridedurationorder": ["h","i"], "overridedurationformat": "%dl:%dm"}'/> </div>
Comments
Post a Comment