Is there a way to specify a standard path for stylesheets (analogous to the “include_path” directive in the php.ini file that specifies the location of PHP includes files) such that you only need to specify the unqualified stylesheet filename in the href value of the link element? Example, just be able to write:
<link rel="stylesheet" href="main.css" />
in all files, regardless of their location on the website, without having to worry about where the main.css file is located?
Thank you
Start your path with a
/and it will be interpreted relative to the root of your website and will work on any file regardless of its location:or if main.css is not in root: