Advertisement

04.29.2008 at 10:36AM PDT, ID: 23362869
[x]
Attachment Details

I have a cascading style sheet with a setting for td , and then I am using a gridview and trying to set forcolor on the row to change the font color and I can't

Asked by wolfcoop in Cascading Style Sheets (CSS), Programming for ASP.NET, Internet Explorer Web Browser

Tags: ,

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="NavGridView_Page" 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="NextPreviousFirstLast" PageButtonCount="1" FirstPageText="&amp;lt;&amp;lt;First" LastPageText="Last &amp;gt;&amp;gt;" NextPageText="Next&amp;gt;" PreviousPageText="&amp;lt;&amp;lt;Pre"  />
        <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
 
 
[+][-]04.29.2008 at 10:44AM PDT, ID: 21464421

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]04.29.2008 at 10:51AM PDT, ID: 21464472

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.29.2008 at 12:40PM PDT, ID: 21465444

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.29.2008 at 02:19PM PDT, ID: 21466304

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Cascading Style Sheets (CSS), Programming for ASP.NET, Internet Explorer Web Browser
Tags: ASP.NET / CSS, Internet Explorer
Sign Up Now!
Solution Provided By: wolfcoop
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628