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
Emily Nkosi
915 PointsFTP/image rendering and links/file path Question
Hello,
I have recently finished my first site that I have coded completely on my own without any CMS. I know that I have successfully uploaded my files via FTP, but I have two problems:
None of the images show. In my text editor that I refreshed as .html files were fine but now they are in the FTP Client non of them show. Does the file path change when you FTP upload? How can I fix this?
Similarly, I have links to my other pages. What file path would my other pages be?
site: simplyemily.me
Thanks in advance!
4 Answers
James Barnett
39,199 PointsEmily Nkosi - I checked the path you are using for your images it's an absolute path referencing your computer's desktop.
What you need to do is convert all of the paths in your code from absolute paths to relative ones. If you are wondering how to do that, read through this article on the basics of file paths
Let us know if are still having issues after reading those articles.
Emily Nkosi
915 PointsHi James, I just read that article. Thank you.
But I am still unclear exactly which one to use of these...
Starting with "/" returns to the root directory and starts there Starting with "../" moves one directory backwards and starts there Starting with "../../" moves two directories backwards and starts there (and so on...) To move forward, just start with the first subdirectory and keep moving forward
Can you, or anyone for that matter... show me what it should look like?
Thanks again!
James Barnett
39,199 PointsEmily Nkosi - Check out this explanation of absolute vs relative paths.
If you are still confused after reading that tutorial, post a screenshot of your file structure and I'll try to provide more specific advice on file paths.
Emily Nkosi
915 PointsHi James,
I am making progress thanks to you!
My HMTL file path are rendering well.
But, no my CSS...
body { font-family: "Helvetica Neue", Helvetica, Ariel, sans-serif; font-size: 14px; line-height: 20px; color: #A66B00; background-image:url('treeLite.gif') repeat; }
Will try post screen shot of file structure next but in short 'treeLite.gif' is in the same file as my CSS.
Any ideas?
THANK YOU THANK YOU THANK YOU JAMES!