N
Nathan Sokalski
I have a stylesheet in the <head> section of my Master Page which is
declared as follows:
<link href="/nathansokalski_com.css" rel="stylesheet" type="text/css"/>
Very simple link tag using a file in the root for the href. Visual Studio is
not telling me it is incorrect or the file doesn't exist or complaining in
any other way about this tag. However, it is telling me that the values from
this *.css file for all of my class and CssClass attributes are not defined.
However, if I change the link tag to the following:
<link href="nathansokalski_com.css" rel="stylesheet" type="text/css"/>
and remove the / from the href value, Visual Studio is able to find all my
style rules in the file. I realize that either one of these will work
correctly, since ASP.NET automatically modifies the href as necessary, but I
want to use the / for the following reasons:
1. I want to be able to copy and paste this code to any Page or Master Page
in any directory without modifying it
2. I should be allowed to use any valid XHTML without recieving errors
3. It usually means a smaller download for the user (maybe only by two
characters, but every bit counts)
Why is Visual Studio 2008 not letting me use a root-relative path for my
link tag's href attribute? Any help would be appreciated. Thanks.
declared as follows:
<link href="/nathansokalski_com.css" rel="stylesheet" type="text/css"/>
Very simple link tag using a file in the root for the href. Visual Studio is
not telling me it is incorrect or the file doesn't exist or complaining in
any other way about this tag. However, it is telling me that the values from
this *.css file for all of my class and CssClass attributes are not defined.
However, if I change the link tag to the following:
<link href="nathansokalski_com.css" rel="stylesheet" type="text/css"/>
and remove the / from the href value, Visual Studio is able to find all my
style rules in the file. I realize that either one of these will work
correctly, since ASP.NET automatically modifies the href as necessary, but I
want to use the / for the following reasons:
1. I want to be able to copy and paste this code to any Page or Master Page
in any directory without modifying it
2. I should be allowed to use any valid XHTML without recieving errors
3. It usually means a smaller download for the user (maybe only by two
characters, but every bit counts)
Why is Visual Studio 2008 not letting me use a root-relative path for my
link tag's href attribute? Any help would be appreciated. Thanks.