【发布时间】:2017-05-19 01:07:43
【问题描述】:
我有一组单选按钮,我希望它们在列标题下等距并居中。这些按钮使用这个 css 来做到这一点:
.staiRadioButtons
{
display: inline;
width: 111px;
}
这在 Firefox 和 Chrome 中运行良好,但在 Safari 中,按钮没有那么宽,因此无法对齐。在表格列中等距排列单选按钮的正确方法是什么?
HTML部分:
<tr>
<td>1. I feel pleasant.</td>
<td><span id="spryradio1">
<label>
<input name="pleasant" type="radio" class="staiRadioButtons" id="pleasant_0" value="4" />
<input name="pleasant" type="radio" class="staiRadioButtons" id="pleasant_1" value="3" />
<input name="pleasant" type="radio" class="staiRadioButtons" id="pleasant_2" value="2" />
<input name="pleasant" type="radio" class="staiRadioButtons" id="pleasant_3" value="1" />
</label>
<span class="radioRequiredMsg">Please make a selection.</span></span></td>
</tr>
【问题讨论】:
标签: html css safari html-table radio-button