Solved

CSS validation error VS 2010

Posted on 2011-02-15
11
2,179 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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This collection of functions covers all the normal rounding methods of just about any numeric value.
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
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…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

911 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

25 Experts available now in Live!

Get 1:1 Help Now