jQuery Mobile: Full width of <select>s fieldgroup

眉间皱痕 提交于 2019-12-30 10:17:30

问题


I have a date picker laid out horizontally:

<fieldset data-role="controlgroup" data-type="horizontal">
    <legend>Your Birth Date:</legend>
    <select name="cboDay" id="cboDay"></select>
    <select name="cboMonth" id="cboMonth"></select>
    <select name="cboYear" id="cboYear"></select>
</fieldset>

How can I force it to render full width?


回答1:


Maybe the navbar would be an option?

  • http://jquerymobile.com/demos/1.2.0/docs/toolbars/docs-navbar.html

Example:

  • http://jsfiddle.net/DjsWv/

Code:

<div data-role="navbar">
    <ul>
        <li><select name="cboDay" id="cboDay" data-corners="false" data-shadow="false"><option>Day</option><option value="1">1</option></select></li>
        <li><select name="cboMonth" id="cboMonth" data-corners="false" data-shadow="false"><option>Month</option><option value="1">1</option></select></li>
        <li><select name="cboYear" id="cboYear" data-corners="false" data-shadow="false"><option>Year</option><option value="1">1</option></select></li>
    </ul>
</div>


来源:https://stackoverflow.com/questions/13040993/jquery-mobile-full-width-of-selects-fieldgroup

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!