RadioButton控件在控件下进行文本换行

时间:2014-02-04 03:23:45

标签: 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>

2 个答案:

答案 0 :(得分:2)

你可以给div填充左边然后负边距单选按钮。您还需要将其向左浮动以使其正确排列:

div {
  padding-left: 20px;
}

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

<强> Demo

答案 1 :(得分:0)

根据你的说法......请看这个小提琴......

http://jsbin.com/efAZIjok/1/edit?html,output