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?

29th Oct 2017, 5:35 AM
Ali Musa
Ali Musa - avatar
2 Answers
+ 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 ^^
29th Oct 2017, 6:44 AM
visph
visph - avatar
+ 3
href="cssfolder/stylesheet.css"
29th Oct 2017, 6:07 AM
Jonathan Pizarra (JS Challenger)
Jonathan Pizarra (JS Challenger) - avatar