asp.net - RadioButton 控件控件下的文字换行

标签 asp.net css

请看下图,aspx代码在图片下方

enter image description here

<div>
    <asp:RadioButton  runat="server" ID="radiobtn" 
         Text="Lorem Ipsum is simply dummy text of the printing and 
         typesetting industry. Lorem Ipsum has been the industry's standard 
         dummy text ever since the 1500s, when an unknown printer took a galley 
         of type and scrambled it to make a type specimen book. It has survived 
          not only five centuries," />
    <br />
    <asp:RadioButton runat="server" ID="RadioButton1" 
          Text="Lorem Ipsum is simply dummy text of the printing and 
          typesetting industry. Lorem Ipsum has been the industry's standard 
          dummy text ever since the 1500s, when an unknown printer took a galley 
          of type and scrambled it to make a type specimen book. It has survived 
          not only five centuries, " />
     <br />
     <asp:RadioButton runat="server" ID="RadioButton2" 
          Text=" Lorem Ipsum is simply dummy text of the printing and 
          typesetting industry. Lorem Ipsum has been the industry's standard 
          dummy text ever since the 1500s, when an unknown printer took a galley 
          of type and scrambled it to make a type specimen book. It has survived 
          not only five centuries," />
</div>

最佳答案

您可以给 div padding-left,然后负边距单选按钮。您还需要将其向左浮动以使其正确对齐:

div {
  padding-left: 20px;
}

input {
  margin: 3px 0 0 -20px;
  float: left;
}

Demo

关于asp.net - RadioButton 控件控件下的文字换行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21542374/

相关文章:

c# - ASP.NET - 何时使用自定义异常?

c# - 您如何处理网站中的不同时区?

javascript - 如何在单页网站的导航栏中突出显示位置?

php - 如何使用 PHP 隐藏/显示文本内容?

html - 文本旁边的中心自定义复选框

html - 使用滚动条在容器中水平对齐 div

c# - ASP.NET Response.Redirect with jQuery Mobile - Url hashing

asp.net - 根据行中列的值更改行的颜色

asp.net - 无法运行kubernetes部署

css - 悬停在另一个 DIV 上时显示 DIV