在Safari中同等间隔单选按钮宽度

时间:2013-04-24 05:25:29

标签: html css safari html-table radio-button

我有一组单选按钮,我希望它们在列标题下等间隔并居中。这些按钮使用此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>

1 个答案:

答案 0 :(得分:0)

试试这个

.staiRadioButtons
{
    float:left;
    width: 111px;
}
相关问题