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

HTML

Building a Directory in Sublime 2?

I should have asked this awhile back but I didn't think it was a huge deal.

Let me show you a couple pieces of my code:

Example 1- <link rel="stylesheet" href="C:\Users\Me\Desktop\css\tree\normalize.css" type="text/css" media="screen">

Example 2- <img src="C:\Users\Me\Desktop\img\featured-cupcake.jpg" alt="Avocado Chocolate Cupcake">

These codes won't work for me but they're used in all the videos:

Example 1- <link rel="stylesheet" href="css/normalize.css" type="text/css" media="screen">

Example 2- <img src="img/featured-cupcake.jpg" alt="Avocado Chocolate Cupcake">

When the code didn't work, I moved a bit of stuff around to get this mess I created to function- it's only a matter of time before I need to create something more functional. I have this terrible feeling I need to start all over. Please help me.

5 Answers

You need not to give the whole path. If the file you want to link is in the same directory as ur code, then just mention its name. Otherwise, if they are on same drive, just give the folder name followed by the file name.

I faced the same issue but tried this and worked for me. I hope this works for you too !

Thanks, Purvi.

Also, if you publish you site to a server the first example you gave will mean nothing and it won't work.

Thanks, Wayne.

Walter, Its just directory issue, I think your did not link files correctly. In video all links are like they used to store all files like index.html and css in same folder so thats why codes work in video.