I am storing style sheets in {root}/styles while images in {root}/images for a website.
- what is difference between
../and~/. ?
I am storing style sheets in {root}/styles while images in {root}/images for a website.
../ and ~/. ? ../ is relative to the current path of the file.
~/ is relative to the root of the application (in ASP.NET).
../ goes up one dir from the current dir.
~/ goes to the dir where you originally came from (not usable in html).
Depends on the framework you are working on.If you have ASP.NET context ~/with ResolveUrl refers to the root level directory, ignoring the sub directories as well.
In CSS we navigate to the previous directories using ../. If you use ../../ you navigate to two steps back and so on.If you use ./, you can reach to the root