Labels in CSS

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
 
G

Guest

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top