单选按钮间隔开

时间:2014-01-31 23:07:21

标签: html radio-button

单选按钮看起来很奇怪,我不知道为什么。这就是它的样子:

enter image description here

我想要排第三,但我不知道如何。

这是所有三个按钮的代码。我尝试使用<pr>标签,但这不起作用。

<td><input type="radio"
           id="examtype" 
           name="examtype" 
           value="GCSE" /> : GCSE<br />
<pr></pr>

<td><input type="radio"
           id="examtype" 
           name="examtype"
           value="A2" /> : A2<br />
<pr></pr>

<td><input type="radio"
           id="examtype"
           name="examtype"
           value="AS"/> : AS<br />
<pr></pr>
</tr>

1 个答案:

答案 0 :(得分:0)

我认为pr不是标签...我猜您打算输入trbr,甚至pre(但这没有意义)。无论如何,使用正确的table结构,元素可以整齐地排列在内,而不会像你的图片中那样奇怪的跳跃:

<table>
    <tr>
        <td>
            <input type="radio" id="examtype" name="examtype" value="GCSE" />: GCSE
        </td>
        <td>
            <input type="radio" id="examtype" name="examtype" value="A2" />: A2
        </td>
        <td>
            <input type="radio" id="examtype" name="examtype" value="AS" />: AS
        </td>
    </tr>
</table>

Example