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>
我试图在input()和它的标签之间创建一些空间,以便这种拥挤
( )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
这是如何实现的?
答案 0 :(得分:0)
您可以尝试创建一个CSS类并将其应用到您的radiobuttonlist,并使用包含所需格式的标签子类。类似的东西:
.yourradioliststyle label {
padding-left:5px;
}