我有一个包含几个单选按钮的标题,让用户在不同的列表视图之间进行选择。我无法改变它,所以它在一行中。四个按钮的宽度大于屏幕尺寸,我无法限制每个输入的宽度。标题中的单选按钮
下面是该部分的代码:
<div data-role="header" data-theme="b" data-position="fixed" style="height:45px;width:100%;">
<div class="centerFieldset">
<fieldset class="radioBtn" data-role="controlgroup" data-type="horizontal" style="margin-top:1px;">
<label for="flow" >Rivers</label>
<input class="type" type="radio" name="radio" id="flow" value="flow"
onClick="javascript:changeFlow()" <?php print $flow_selected;?> />
<label for="lake" >Lakes</label>
<input class="type" type="radio" name="radio" id="lake" value="lake"
onClick="javascript:changeLakes()" <?php print $lake_selected;?> />
<label for="meteo" >Meteo</label>
<input class="type" type="radio" name="radio" id="meteo" value="meteo"
onClick="javascript:changeMeteo()" <?php print $meteo_selected;?>/>
<label for="tableau" >Tableau</label>
<input class="type" type="radio" name="radio" id="tableau" value="tableau"
onClick="javascript:changeMeteo()" />
</fieldset>
</div>
</div>
CSS文件是:
.centerFieldset { 文本对齐:中心; }
.centerFieldset fieldset { display:inline; margin-left:auto; margin-right:auto; 宽度:100%; }
这里是如何看起来像:
当我尝试标签宽度限制在20%,我得到这个:
什么是你的问题/问题? – Chris 2012-07-17 10:00:22
我希望标题保持一行! :-) – Lucia 2012-07-17 10:01:14
好吧,减少'