Labels in CSS

  • Thread starter Thread starter tshad
  • Start date Start date
T

tshad

I have the following in my css file:

..GridItem
{
background-color: Green; color:Black;
}

..GridAltItem
{
background-color: red; color:Black;
}

And in my GridView I have:

<AlternatingRowStyle CssClass="GridAltItem"/>
<RowStyle CssClass="GridItem"/>

There is nothing on my templates.

For my labels, I can't get the styles to apply my background colors at all
and they don't show up in my view source. But they do in my design mode.

But even in the design mode, the text is coming out BLUE. Which isn't
defined anywhere in my project.

But in my view source it does show:

</tr><tr class="GridAltItem" style="color:Blue;">

and for the other row:

</tr><tr class="GridItem" style="color:Blue;">

In both cases, I assume the "style" is overriding my class. Why is it even
there?

Thanks,

Tom
 
I have the following in my css file:

.GridItem
{
background-color: Green; color:Black;

}

.GridAltItem
{
background-color: red; color:Black;

}

And in my GridView I have:

                <AlternatingRowStyle CssClass="GridAltItem"/>
                <RowStyle CssClass="GridItem"/>

There is nothing on my templates.

For my labels, I can't get the styles to apply my background colors at all
and they don't show up in my view source.  But they do in my design mode.

But even in the design mode, the text is coming out BLUE.  Which isn't
defined anywhere in my project.

But in my view source it does show:

        </tr><tr class="GridAltItem" style="color:Blue;">

and for the other row:

        </tr><tr class="GridItem" style="color:Blue;">

In both cases, I assume the "style" is overriding my class.  Why is it even
there?

Thanks,

Tom

It looks like you defined blue on gridview level -- <asp:GridView
color=....

Can you check it?
 
Back
Top