Shouldn’t GridView’s RowStyle-HorizontalAlign property overwrite CSS’s text-align property?
- by AspOnMyNet
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