473,396 Members | 1,810 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

CssClass problem

I made a style sheet with the following class:

..ErrText {
color:#FF0000;
font-family:Verdana,Tahoma,Arial;
font-size:9pt;
}

I linked it to my ASPX doc, then in the CssClass property for a label
control, then a Text control, I put .ErrText

This really seems to have little affect on it in IE or Firefox.

What am I doing wrong?

Thanks,

Shane
Mar 31 '06 #1
6 1312
CssClass="ErrText"

don't include the .

--
Robbe Morris - 2004-2006 Microsoft MVP C#
Earn money answering .NET questions
http://www.eggheadcafe.com/forums/merit.asp

"Shane Story" <no****@nothanks.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
I made a style sheet with the following class:

.ErrText {
color:#FF0000;
font-family:Verdana,Tahoma,Arial;
font-size:9pt;
}

I linked it to my ASPX doc, then in the CssClass property for a label
control, then a Text control, I put .ErrText

This really seems to have little affect on it in IE or Firefox.

What am I doing wrong?

Thanks,

Shane

Mar 31 '06 #2
Leave the '.' out when you refer to the class in the document. The '.' is
part of the StyleSheet syntax, not the class reference in the document.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Show me your certification without works,
and I'll show my certification
*by* my works.

"Shane Story" <no****@nothanks.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
I made a style sheet with the following class:

.ErrText {
color:#FF0000;
font-family:Verdana,Tahoma,Arial;
font-size:9pt;
}

I linked it to my ASPX doc, then in the CssClass property for a label
control, then a Text control, I put .ErrText

This really seems to have little affect on it in IE or Firefox.

What am I doing wrong?

Thanks,

Shane

Mar 31 '06 #3
Actually I am pretty sure I don't have the "." in that property.
I will have to check that tonight--I am not in front of the code at this
moment.

The only thing different I have done is added a browserCaps section to
web.config that I got from the Internet to better suppport FireFox. Is
seems to have css1 and 2 turned on there.

Thanks
"Robbe Morris [C# MVP]" <in**@eggheadcafe.com> wrote in message
news:eJ**************@TK2MSFTNGP10.phx.gbl...
CssClass="ErrText"

don't include the .

--
Robbe Morris - 2004-2006 Microsoft MVP C#
Earn money answering .NET questions
http://www.eggheadcafe.com/forums/merit.asp

"Shane Story" <no****@nothanks.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
I made a style sheet with the following class:

.ErrText {
color:#FF0000;
font-family:Verdana,Tahoma,Arial;
font-size:9pt;
}

I linked it to my ASPX doc, then in the CssClass property for a label
control, then a Text control, I put .ErrText

This really seems to have little affect on it in IE or Firefox.

What am I doing wrong?

Thanks,

Shane


Mar 31 '06 #4
Maybe it is because I started out by manually specifying values and later
put in the class. I went over each property to delete them, but maybe that
didn't take.

Doing this from scratch on a new page without ever setting properties
otherwise, seems to work. I will try that theory tonight.

-Shane
"Shane Story" <no****@nothanks.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
I made a style sheet with the following class:

.ErrText {
color:#FF0000;
font-family:Verdana,Tahoma,Arial;
font-size:9pt;
}

I linked it to my ASPX doc, then in the CssClass property for a label
control, then a Text control, I put .ErrText

This really seems to have little affect on it in IE or Firefox.

What am I doing wrong?

Thanks,

Shane

Mar 31 '06 #5
Thanks Kevin,

I double checked and the "." was the problem. What a bugger that was to
debug.
"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Leave the '.' out when you refer to the class in the document. The '.' is
part of the StyleSheet syntax, not the class reference in the document.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Show me your certification without works,
and I'll show my certification
*by* my works.

"Shane Story" <no****@nothanks.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
I made a style sheet with the following class:

.ErrText {
color:#FF0000;
font-family:Verdana,Tahoma,Arial;
font-size:9pt;
}

I linked it to my ASPX doc, then in the CssClass property for a label
control, then a Text control, I put .ErrText

This really seems to have little affect on it in IE or Firefox.

What am I doing wrong?

Thanks,

Shane


Apr 1 '06 #6
> What a bugger that was to debug.

No doubt, Shane. Those tiny syntax errors are easy to overlook, especially
when they don't affect the way the app runs.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Show me your certification without works,
and I'll show my certification
*by* my works.

"Shane Story" <no****@nothanks.com> wrote in message
news:Ot**************@TK2MSFTNGP10.phx.gbl...
Thanks Kevin,

I double checked and the "." was the problem. What a bugger that was to
debug.
"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Leave the '.' out when you refer to the class in the document. The '.' is
part of the StyleSheet syntax, not the class reference in the document.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Show me your certification without works,
and I'll show my certification
*by* my works.

"Shane Story" <no****@nothanks.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
I made a style sheet with the following class:

.ErrText {
color:#FF0000;
font-family:Verdana,Tahoma,Arial;
font-size:9pt;
}

I linked it to my ASPX doc, then in the CssClass property for a label
control, then a Text control, I put .ErrText

This really seems to have little affect on it in IE or Firefox.

What am I doing wrong?

Thanks,

Shane



Apr 1 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Mervin Williams | last post by:
I am having a problem setting the CSSClass property of a my Label control. I set CSSClass property, but its not taking the font style settings. Here is my style: ..TabText { font-weight:...
0
by: Steve Kallal | last post by:
I have a DataGrid with an EditCommandColumn column set to a type of PushButton. I want to set set CssClass on these buttons and cannot without using code-behind code on the ItemDataBound event. The...
6
by: msuk | last post by:
All, I have a ASP.NET/C# webform which contains a Webform button that has a CssClass applied to give it a special effect. Now the same webform has a filefield control but the browse button is...
6
by: tshad | last post by:
Are Validators able to use CSSClass? I have the following: <asp:RegularExpressionValidator ControlToValidate="txtEmail" CssClass="errorMessage" Text = "Invalid Email Address!"...
1
by: chrisfox | last post by:
Hi, I try to customize the style of my Webparts with a CSS Stylesheet. Therefore I define a CSS File and define some CSS Classes. Now a problem occurs. Some of the classes have no effect on the...
2
by: prasad | last post by:
see iam having a user control and i want a cssclass for that users control ,no prolem in providing that .but the problem is that it requires two diff styles for the same control so i need two...
2
by: Kevin L. Kitchens | last post by:
Howdy... Been toying the the asp:menu object in order to dump the manually generated menu I've been using, however, I cannot seem to get the coloring to work properly. First off, what CSS...
2
by: shapper | last post by:
Hello, I created a custom control that inherits CompositeControl: Public Class MySection Inherits CompositeControl ... Protected Overrides Sub CreateChildControls() ......
1
by: Jonathan Wood | last post by:
Greetings, On a GridView control, I want to show alternating colors. But instead of alternating on each row, I want to alternate each group. So several items would be one color and the next...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.