Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have a couple of spots in my HTML that use z-index.

 

The HTML displays correctly in Internet Explorer, but will not compile when part of my Visual Studio 2005 website project.

 

This line, for example:

[size=1][color=#0000ff]
<[/color][/size][color=#a31515]div[/color] [color=#ff0000]class[/color][color=#0000ff]="logo"[/color] [color=#ff0000]style[/color][color=#0000ff]="z-index:2;"><[/color][color=#a31515]img[/color] [color=#ff0000]alt[/color][color=#0000ff]=""[/color] [color=#ff0000]src[/color][color=#0000ff]="~logos/blue.gif"[/color] [color=#0000ff]/></[/color][color=#a31515]div[/color][size=1][color=#0000ff][size=2]>[/size]
[/color][/size]

Gives me this error:

Error 1 CSS validation: 'z-index' is not a valid CSS property name.
Is there a way to fix this?
Posted
I have a couple of spots in my HTML that use z-index.

 

The HTML displays correctly in Internet Explorer, but will not compile when part of my Visual Studio 2005 website project.

 

This line, for example:

[size=1][color=#0000ff]
<[/color][/size][color=#a31515]div[/color] [color=#ff0000]class[/color][color=#0000ff]="logo"[/color] [color=#ff0000]style[/color][color=#0000ff]="z-index:2;"><[/color][color=#a31515]img[/color] [color=#ff0000]alt[/color][color=#0000ff]=""[/color] [color=#ff0000]src[/color][color=#0000ff]="~logos/blue.gif"[/color] [color=#0000ff]/></[/color][color=#a31515]div[/color][size=1][color=#0000ff][size=2]>[/size]
[/color][/size]

Gives me this error:Is there a way to fix this?

 

This looks like it may be an installation issue. I just threw that same code into an ASP.NET project and it compiled without any problems.

 

VS shouldn't actually validate your CSS like that.

 

Are you only trying to compile it, or did you also try to debug (F5 or CTRL+F5)?

 

~Derek

Check out my blog! DevPaper.NET
Posted
Looks like F5 ran it anyway. What do you know?

 

Visual Studio shouldn't list it as one of the errors with a red 'X' in the Error List bar if it isn't really an error.

 

Thanks Derek.

 

I'm glad it worked :)

 

I still find that to be a very strange issue. I've compiled websites dozens of times and have never received an error about CSS.

 

~Derek

Check out my blog! DevPaper.NET
Posted

That most likely a valid error, and may not render correctly in Firefox, Opera, or Safari. Visual Studio is warning you that it's not "valid CSS" it's not a compiler error, it's an HTML/CSS Markup Error. Your site will compile and run OK; however, your pages may exhibit strange behavior in other browsers.

 

HTH

~Nate�

___________________________________________

Please use the [vb]/[cs] tags on posted code.

Please post solutions you find somewhere else.

Follow me on Twitter here.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...