【问题标题】:CheckboxList item text CSS复选框列表项文本 CSS
【发布时间】:2014-06-08 22:06:18
【问题描述】:

下面是我的复选框列表。文本显示在复选框下方。

我怎样才能把文字排成一行?这是我的视图源代码

<tr>
            <td><input id="ContentPlaceHolder1_cblReason_16" type="checkbox" name="ctl00$ContentPlaceHolder1$cblReason$16" value="02. Form of product order/purchase (POS with immediate delivery, POS with delayed delivery, Mail order, Phone order, Internet order)" /><label for="ContentPlaceHolder1_cblReason_16">02. Form of product order/purchase (POS with immediate delivery, POS with delayed delivery, Mail order, Phone order, Internet order)</label></td>
        </tr>




 <tr>
    <td style="text-align: left;" colspan="2">
    <asp:CheckBoxList ID="cblReason" runat="server" RepeatColumns="1" TextAlign="Right">
    <asp:ListItem>01. Two years of financial statements</asp:ListItem>
    <asp:ListItem>02. Form of product order/purchase (POS with immediate delivery, POS with delayed delivery, Mail order, Phone order, Internet order)</asp:ListItem>
    <asp:ListItem>03. Delivery timeframe.  If product delivery is not immediate, outline average timeframe between initial product purchase and  delivery of product.  If services are purchased, outline average timeframe between initial order and complete provision of  Service.                      </asp:ListItem>
</asp:CheckBoxList>

【问题讨论】:

  • 你能发布渲染的 HTML 吗?
  • 您好,我有图片,但由于我是新来的,所以无法上传
  • 无需发布图片,只需将 HTML 渲染到浏览器即可。
  • @j08691 我该怎么做?
  • 右键单击页面并查看源代码以查看发送到浏览器的内容。

标签: css checkboxlist


【解决方案1】:

由于复选框是内联元素,您可以将文本包装在 &lt;span&gt; 元素中,该元素也是内联元素。

举个例子:

&lt;input type="checkbox" /&gt;&lt;span&gt;Label&lt;/span&gt;

【讨论】:

  • 你好,我没有得到你。能详细点吗?
猜你喜欢
  • 1970-01-01
  • 2014-07-20
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-05-26
  • 2016-04-23
  • 2017-05-04
相关资源
最近更新 更多