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 trialAakash Srivastav
Full Stack JavaScript Techdegree Student 11,638 PointsCreating a product pages site
I am getting error every time. This is the Link to my Github repo. I am getting message as 404 File not found Please help me.
2 Answers
Leslie Heinzen
26,662 PointsI'm not seeing a 404 at https://aakashsr.github.io/Treehouse-techdegree-project-1/. It is working correctly for me. Is this the URL you are attempting to visit?
Couple of tips to clean up your repository, though:
- If you don't have a
.gitignore
file, create one and add any files or folders to it that you don't want tracked with version control. There is no reason to have a debug log in your repo, for example. - You are using CDNs for all of your images, so you do not need to include a folder of images in your repository.
- Move the README to the root of your project. It doesn't belong in the css folder.
Aakash Srivastav
Full Stack JavaScript Techdegree Student 11,638 PointsActually the problem was "firstly I uploded the icons by the second path i,e url("img/twitter.svg")" , but it didn't work so I upload the icons from the net.
Leslie Heinzen
26,662 PointsThe path should work. Your img folder is inside your css folder, so if you are referencing them with relative paths, you have to be careful.
I checked your git history. Previously, you were attempting this:
.twitter{
background-image: url("twitter.svg");
}
This will fail because it is looking for that file inside the css folder.
And this:
.twitter{
background-image: url("../img/twitter.svg");
}
This will fail because it is looking for the img folder from the root directory (which does not exist).
Try the path I proposed.
Aakash Srivastav
Full Stack JavaScript Techdegree Student 11,638 PointsAakash Srivastav
Full Stack JavaScript Techdegree Student 11,638 PointsIs is good to add your images from your local machine ? Is not there any security issue? I am having doubt about it and doesn't have any clear knowledge about it all. Please help.
Leslie Heinzen
26,662 PointsLeslie Heinzen
26,662 PointsYou can do it either way. There is no security problem with it. I was just pointing out that you are not currently using them in your CSS, so there is no reason to include them in the repo.
If you wanted to instead serve the image files from your repository, you just need to update the
background-image
urls in your CSS.For example:
Will change to: