0
在以下HTML中,由于文本太长,我的目标是将文本对齐到上一行文本的下方。复选框和文本未对齐
当我执行以下操作时,复选框在一行上,文本在下面。
我的目标是让复选框和下一个在同一行上。如果文字太长,文字应该包裹在前一行的下方。
<div style="float:left;margin-right:10px">
<asp:CheckBox ID="chkOption1" runat="server"/>
</div>
<div style="float:left">
<b><u>Option 1</u></b> - Attend in person. This is the best way to gain critical knowledge and express your thoughts and opinions.
</div>
<div style="clear:both"></div>
下面是HTML代码如下所示:
<div style="float:left;margin-right:10px">
<input id="chkOption1" type="checkbox" name="chkOption1" />
</div>
<div style="float:left">
<b><u>Option 1</u></b> - Attend in person. This is the best way to gain critical knowledge and express your thoughts and opinions. Ample time will be provided for individual discussions during breaks and at the networking reception.
</div>
<div style="clear:both"></div>
你标记你的问题的HTML,但我不能看这是HTML。请给我们最终生成的HTML输出。我无法阅读ASP,也不打算很快学习。 –
将复选框和文本包装在与CSS相同的div中。 – OJFord