PDA

View Full Version : font color of label using dot net asp


Greg
08-18-2004, 06:13 AM
How do I change the font color of a label in the stylesheets

in the stylesheets I have what I called

a label

and within the page I have label1

I can not seem to get the label in the stylesheets to effect the font color on the label...
is it fore-color that I need to use to change color and if so how is the line written?

using Microsoft dot net studio.....and this is for an asp page

thanks for any infor :weee:

dabbler
08-18-2004, 06:22 AM
I'm not sure what you mean, Greg. Can you post a least some of the css code and html it will be applied to, including the label?

Greg
08-18-2004, 06:52 AM
The label is a deep blueist color and we would like the text to be white, we have coded this without style sheet but we are wanting to use style sheet so if they are style changes in the future we can modify the style page but because we can not get the font of the text
white we are :smack:



Styles.css

.label

{

color: white;

font-family: Verdana, Arial;

font-size: 14px;

}



login.aspx

<TR>

<TD bgColor="#000066">

<P align="center"><asp:label id="Label3" runat="server" cssStyle=”Styles.css">Login Page</asp:label></P>

</TD>

</TR>

dabbler
08-18-2004, 07:09 AM
Now I know nothing at all of asp, I thought it was a reptile, but if you put class="label" in the code where you have cssStyle="Styles.css", and I assume you have a link in the head section of your page to the style sheet, then it should do it.
link to the external sheet thus:
<link href="greg.css" rel="stylesheet" type="text/css">
in the head section of the page
and in your page:
<P align="center"><asp:label id="Label3" runat="server" class="label">Login Page</asp:label></P>

This worked OK in Topstyle when I tried it. HTH

Greg
08-18-2004, 07:51 AM
:) Cheers! to dabbler

You were right on!... without even knowing ASP!

Thanks

denasinc
10-14-2004, 05:40 AM