Solved

CSS validation error VS 2010

Posted on 2011-02-15
11
2,176 Views
Last Modified: 2012-08-13
I must have changed a setting in my project, but don't know what it is.  Everything was fine, except now I get two errors -

Validation (CSS 2.1): 'overflow-x' is not a known CSS property name.      

-and-

'Text' is not a member of 'Label'.

I would rather not turn errors off.  Is there a way to update the CSS validation?  These are good properties.

Thanks
0
Comment
Question by:sabev
  • 5
  • 5
11 Comments
 
LVL 16

Expert Comment

by:SSupreme
ID: 34897337
overflow-x; overflow-y are properties of CSS3 version
0
 
LVL 14

Expert Comment

by:Designbyonyx
ID: 34897411
Just answered another question recently about VS and CSS validation... and we came to the conclusion to disable CSS validation for 2 reasons:

1) CSS 3 is becoming more popular and widely used
2) Who would trust a CSS validator built by Microsoft ;)
0
 

Author Comment

by:sabev
ID: 34897461
So, how would I use CSS3 to validate in VS2010, or how do I disable CSS validation?
0
 
LVL 14

Accepted Solution

by:
Designbyonyx earned 125 total points
ID: 34898190
Unfortunately, VS does not include validation rules for CSS3.  Are you kidding me?  IE8 barely supports CSS2.  Which is again why I would never put any faith or reliance on a CSS validator built by Microsoft.  Don't get me wrong, they have many great products... but they have failed miserably in the area of CSS.  You should trust the people that write the specification:

http://jigsaw.w3.org/css-validator/

To disable error detection in VS, you can go to:

Tools -> Options -> Text Editor -> CSS -> Miscellaneous
0
 

Author Comment

by:sabev
ID: 34898247
Thats what i'll do.

If I may extend the question...  I am now getting a compilation error on this line

- Line 362:        lableSchno.Text = "&nbsp&nbsp" + "Schedule # " + strSchno.ToString

Compiler Error Message : BC30456: Text is not a member of 'Label'

Is this related
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 14

Expert Comment

by:Designbyonyx
ID: 34898350
That shouldn't be related.  You need to make sure that you are actually targeting a .NET Label control.  Here is basically what you should have

(Note: I changed a couple things that didn't really look right)

<asp:Label ID="lableSchno" runat="server" />

lableSchno.Text = "&nbsp;&nbsp;Schedule # " + strSchno.ToString();

Open in new window

0
 

Author Comment

by:sabev
ID: 34898449
Hmm... I'm adding it on the fly.      


 Dim lableSchno As New Label

        lableSchno.Text = "&nbsp;&nbsp;Schedule # " + strSchno.ToString
0
 
LVL 14

Expert Comment

by:Designbyonyx
ID: 34898592
Hmm, that looks good to me.  Can you try removing those 2 lines and seeing if your code still works.  Maybe you could show me the surrounding code... maybe copy the entire function and paste it here.

i'm not the best at VB, but I'll take a look at it.
0
 

Author Comment

by:sabev
ID: 34898884
Wooohhh.....  I commented out the line, and the app now tries to load a file called label.aspx.  (it is one of mine).  There is no place in the code that I currently reference that file (I commented it all out).

This particular project is a copy of another project that works perfectly fine.  I mean, I litterally copied every thing from the good one and just dropped it in a new ISS virtual directory.  Very strange.

I'm going to nuke it and start over.

I'll post back once I've done that.
0
 

Author Comment

by:sabev
ID: 34899321
Hokay.  Working fine now.  I suspect that something got corrupt in IIS.


Thanks again DesignBy
0
 
LVL 14

Expert Comment

by:Designbyonyx
ID: 34899786
no worries.  Usually, when you have code that you know is valid, but the compiler throws you an error, then the problem is really elsewhere.  Glad you got it working.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now