<asp:GridView AutoGenerateColumns="false" ID="gvFriend" runat="server" PageSize="5"
AllowPaging="false" DataKeyNames="Email">
<Columns>
<asp:TemplateField>
<HeaderTemplate>
<asp:CheckBox ID="chkhead" AutoPostBack="true" runat="server" Text="Select All">
</asp:CheckBox>
</HeaderTemplate>
<ItemTemplate>
为headertemplate中的复选框设置样式的最佳方法是什么?
目前显示为
[x] Select All
我希望它是
Select All
[x]
答案 0 :(得分:0)
HTML:
<div class="warpper">
<span class="span">Select All</span>
<input id="Checkbox1" type="checkbox" />
</div>
CSS:
.span
{
display: block
}
.warpper {
border: 1px dotted firebrick;
text-align: center;
width: 80px;
}