+1

Relative path against a folder

Matteo Del Vecchio 12 years ago updated 12 years ago 3
When I use HTML and CSS files, I have to rewrite every path that is in code. Why don't you make every path relative to its super directory? That's what I mean: in the Files view, I create a new folder called Project, where I put every file that belongs to that project. Inside it I create and index.html file and a folder called "images". Now when I write the code I would like that paths should be written as /images/image.png instead of adding even the main folder name like /Projects/images/image.png
This would improve the user experience, I think.
+1
You can do that: just write images/image.png - you need to leave out the first slash. The slash would tell it to look at the root directory - just like on a real web server.
+1
See also http://webdesign.about.com/od/beginningtutorials/a/aa040502a.htm

  • links in the same directory as the page have no path information listed: filename
  • sub-directories are listed without any preceding slashes: directory/filename
  • links up one directory are listed as: ../filename

Thank you so much Alexander... I didn't remember these things :) I'm really sorry and thank you so much for this fantastic application! ;)