1

ASP.NET 将单选按钮列表呈现为表格中的行,并在单元格中输入,如下所示:

    <table id="sites">
    <tr>
        <td>
           <input id="sites_11" type="radio" name="sites" value="1583" />
          <label for="sites_11">This is a very long site name including city and state</label>
         </td>

    </tr>
          .
          .
          <snip>
    </table>

我试图在输入()和它的标签之间创建一些空间,以便这种拥挤

    ( )This is the beginning of a long label

变成这样:

    ( )  This is the beginning of a long label

另外,由于标签很长,而且很多都是包裹的,所以我希望包裹不要延伸到 () 下方。我希望它看起来像这样:

    ( ) This is a very long label for the site which includes
        the city and state 

不是这样的:

       ( ) This is a very long label for the site which includes 
       the city and state 

这是如何实现的?

4

1 回答 1

0

您可以尝试创建一个 CSS 类并将其应用于您的单选按钮列表,其中包含您所需格式的标签子类。就像是:

.yourradioliststyle label {
padding-left:5px;

}

于 2015-01-09T21:00:54.373 回答