0
what is the relative path for the css file in the href attribute for the link element, if the file was in one more directory nex
what is the relative path for the css file in the href attribute for the link element, if the file was in one more directory next to the html file?
2 Respuestas
+ 5
For "next" as "directory of css file in same directory than html file", refer to @Jonathan answer...
For "next" as "directory of css file in same directory than the one containing the html file":
href="../cssfolder/stylesheet.css"
"../" is a special directory name standing for actual directory (directory of html file in html code context) parent, allowing you to access sibling and parents (you can have many parent level directory as "../../../myfloder/myfile") directories rather than just children directories... Obviously, each web server configuration provide a root web directory that limit the possible access to other sibling and parents (private) directories of the server ^^
+ 3
href="cssfolder/stylesheet.css"