I've been all around the internet on this. Every place I go says this should work. But it doesn't! The only way I can get my checkbox to align vertically in the middle is to make the row very high (line-height: 200%
So, someone please tell me why this code doesn't work:
css:
.Grid_CheckBox
{
vertical-align: middle;
}
Markup:
<asp:TemplateField HeaderText="Select">
<ItemTemplate>
<asp:CheckBox ID="SelectCheckBox" runat="server" Width="40px" />
</ItemTemplate>
<ItemStyle CssClass="Grid_CheckBox" />
</asp:TemplateField>
Or this markup:
<asp:TemplateField HeaderText="Select">
<ItemTemplate>
<asp:CheckBox ID="SelectCheckBox" runat="server" Width="40px" />
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
</asp:TemplateField>
I've attached a screenshot of what I get.
Thanks in advance,
Jerry
Jerry Scannell
So, someone please tell me why this code doesn't work:
css:
.Grid_CheckBox
{
vertical-align: middle;
}
Markup:
<asp:TemplateField HeaderText="Select">
<ItemTemplate>
<asp:CheckBox ID="SelectCheckBox" runat="server" Width="40px" />
</ItemTemplate>
<ItemStyle CssClass="Grid_CheckBox" />
</asp:TemplateField>
Or this markup:
<asp:TemplateField HeaderText="Select">
<ItemTemplate>
<asp:CheckBox ID="SelectCheckBox" runat="server" Width="40px" />
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
</asp:TemplateField>
I've attached a screenshot of what I get.
Thanks in advance,
Jerry
Jerry Scannell