tjillian87 Posted February 9, 2016 Share Posted February 9, 2016 I am struggling with relative folder pathnames. I have created a parent folder, and within this parent are the three child folders, if one is to look at the file hierarchy as a tree in order to visualize the subfolders. For example, "/" is the parent of file folder "project2." Project2 is therefore the parent of files "home.html," "aboutme.html," and folder "adrbook," which is the parent of "listform.html" I want to reference folders using relative pathnames. For example, if I am currently working in file folder "home.html," and I want the browser to search folder "about me.html," what should I type as the path? "Home.html" and "aboutme.html" are siblings and children of Project2. Since I am using Windows 7, I thought: <a href="\aboutme.html">content </a> Link to comment Share on other sites More sharing options...
Ingolme Posted February 9, 2016 Share Posted February 9, 2016 A single slash refers to the root of the entire system, which on Windows would usually be C:\. What you need to do for each file is to go up one folder using ../ and then choose the folder the other file is in. If two files are in the same folder, just using the name of the other file will link to it. To link to listform.html from home.html: <a href="../adrbook/listform.html>Link</a> To link to aboutme.html from home.html: <a href="aboutme.html>Link</a> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now