I need direction on what overrides what. Style cheet verses inline style tags, verses property settings on a control. I have a CSS style sheet that sets my font to white as I have a blue background.
body, th, td, textarea, option, textbox {
font-family: "Trebuchet MS", "Times New Roman", Arial, Times, serif;
color: #FFFFFF;
/*background-color: #222222;*/
}
the problem is I have a gridview where I need the font color to not be white. When a gridview is renderred it creates td for the rows and cells and it appears that the style sheet values for td override any property values I set on the gridview.
Here is my gridview code.
<ASP:GridView id="NavGridView" runat="server" DataKeyNames="LeadID" Font-Size="9pt" AllowPaging="True" ForeColor="#132144" OnPageIndexChanging="NavGr
idView_Pag
e" PageSize="1" ShowHeader="False" BackColor="#132144" BorderColor="#132144">
<Columns>
<asp:BoundField SortExpression="LeadID" Datafield="LeadID" >
<ItemStyle Width="50px" />
</asp:BoundField>
</Columns>
<RowStyle BorderColor="#132144" ForeColor="#132144" />
<PagerSettings Mode="NextPreviousFirstLas
t" PageButtonCount="1" FirstPageText="&lt;&am
p;lt;First
" LastPageText="Last &gt;&gt;" NextPageText="Next&gt;
" PreviousPageText="&lt;
&lt;Pr
e" />
<PagerStyle HorizontalAlign="Left" BackColor="#132144" ForeColor="White" />
</ASP:GridView>
The text of the gridview row is still white. How do I override this????? Anyone?
I have tried setting a custom id based CSS definition for the tr surrounding the gridview, and still the font is white. I can affect other things like Capitilization of the font, I just can not change the color.
Start Free Trial