Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Justin Rose
13,601 PointsLinking pages
ok. so i tryed linking pages like in the video from the absolute path from another folder. I made the page connect the another_page.html but when i enter the ../ to go back to the other page its not working for me. Can someone help as this is very basic?
1 Answer
Robert Goddard
15,019 PointsConsider the directory structure:
- Project
- Folder 1
- index.html
- another_page.html
- Folder 2
- something.txt
- Folder 1
If "../another_page.html" is used in the context of index.html, the relative path would say to "look in" Project for another_page.html.
A single . means the same directory that I'm currently in so: If "./another_page.html" is used in the context of index.html, the relative path would say to "look in" Folder 1(my current folder) for another_page.html.
Hope this helps.