Solved

CSS validation error VS 2010

Posted on 2011-02-15
11
2,182 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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
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
 
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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …

832 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