Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
Why do I always get this squiggly error lines under my EXISTING files? It annoys me so much. If I put a / before the files, the error goes away, but it doesn't work in the page.
Development & Research Department @ Elven Soft
Posted

Absolute paths with ~

 

If the CSS file is in the same directory as the page then it should not be highlighted. You could try fully qualifying it with an absolute path using the ~ character which denotes the root project directory.

 

href="~/style.css"

or

href="~/subdir/style.css"

etc.

 

Note that the special behaviour of the ~ character only works with elements which are parsed server-side, such as those within the head element or those with the runat="server" attribute.

 

Good luck :)

Never trouble another for what you can do for yourself.

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