Shouldn’t GridView’s RowStyle-HorizontalAlign property overwrite CSS’s text-align property?
Posted
by AspOnMyNet
on Stack Overflow
See other posts from Stack Overflow
or by AspOnMyNet
Published on 2010-03-19T19:35:42Z
Indexed on
2010/03/19
19:41 UTC
Read the original article
Hit count: 198
a) As far as I know, GridView’s RowStyle-HorizontalAlign
property should overwrite CSS’s text-align
property, and thus text inside GridView's cells should be located on the left side of the cells, but is instead moved to the right side. Why is that?
b) Similarly, RowStyle-Font-Bold
should overwrite CSS’s font-weight
property and thus fonts shouldn’t be in bold. But again, CSS’s property overwrites RowStyle’s Font-Bold
property. Why?
<div id="someClass">
<asp:GridView ID="gvwShowUsers" runat="server" >
<RowStyle BackColor="#FFFBD6" ForeColor="#333333" Font-Bold="false"
HorizontalAlign="Left" />
<Columns>
<asp:BoundField DataField="UserName" HeaderText="UserName" />
</Columns>
</asp:GridView>
</div>
CSS file:
#someClass td
{
font-weight:bolder;
text-align:right;
}
thanx
© Stack Overflow or respective owner