joe_pool_is Posted May 19, 2008 Posted May 19, 2008 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? Quote Avoid Sears Home Improvement
Fork501 Posted May 19, 2008 Posted May 19, 2008 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 Quote Check out my blog! DevPaper.NET
joe_pool_is Posted May 20, 2008 Author Posted May 20, 2008 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. Quote Avoid Sears Home Improvement
Fork501 Posted May 20, 2008 Posted May 20, 2008 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 Quote Check out my blog! DevPaper.NET
Nate Bross Posted May 20, 2008 Posted May 20, 2008 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 Quote ~Nate� ___________________________________________ Please use the [vb]/[cs] tags on posted code. Please post solutions you find somewhere else. Follow me on Twitter here.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.