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 trialAdam Flanagan
8,022 PointsMy html isn't linking my external CSS?
?<head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/ <title>Smells Like Bakin' Cupcake Company</title <link rel="stylesheet" href="css/normalize.css" type="text/css" media="screen" <link rel="stylesheet" href="css/grid.css" type="text/css" media="screen" <link href='http://fonts.googleapis.com/css?family=Nunito' rel='stylesheet' type='text/css' <link rel="stylesheet" href="css/style.css" type="text/css" media="screen" </head
*Note that I have deliberately cut off all closing tags.
Adam Flanagan
8,022 PointsTried this, still nothing?
gareth connop
14,865 PointsYou can create a Codepen over at http://codepen.io/ for testing. Then if you post the link here, I can have a look.
Adam Flanagan
8,022 PointsHere it is: http://codepen.io/anon/pen/GbKgn
gareth connop
14,865 PointsThanks Adam but can you also put the CSS from style.css into the CSS section. It just makes it easier to work out what's going on.
13 Answers
Alan Massie
14,976 PointsHi Adam,
It may be a problem with finding the css files within the folders. As a test you could try moving the css files into the same folder as your HTML file and remove the folder css from the file path (alter from href="css/grid.css" to href="grid.css").
If that does work then maybe the folders have problems with the permissions... or the filepath is wrong.
Let me know how you get on!
Cheers Alan Alan
James Barnett
39,199 PointsLooks like you've got an issue with is an issue with file paths. So here's a quick primer on file paths that should get you going.
Also depending on your web server, the directories & filename that makes up your path may be case-sensitive. So triple check the spelling and capitalization of the path. Check out this tutorial if you are still confused on the differences between absolute vs relative filepaths.
Adam Flanagan
8,022 PointsOK, but there isn't much.
Adam Flanagan
8,022 PointsAdam Flanagan
8,022 Pointshmnn still nothing...
Chris Howell
Python Web Development Techdegree Graduate 49,702 PointsI was going to post the same reply about directory because I see nothing wrong with the code you posted on CodePen. But since you tried that already.
What browser are you running and what version is it? Click around in the top menu bar and look for the Help and then click About to find the version if you dont already know it.
Adam Flanagan
8,022 Pointslatest version of chrome running on a mac
Adam Flanagan
8,022 PointsI have screenshotted my Sublime Text window how can I get that to you?
Matt Campbell
9,767 PointsGet on photobucket and then once the image is uploaded, copy one of the link urls to here. Should show up.
Chris Howell
Python Web Development Techdegree Graduate 49,702 Pointsuse that site, upload it, complete the security box. It will display a page of code. Send me the URL code it should allow me to view it. Be sure to upload in 1024 quality so I am able to make out the words ;)
edit: photobucket works too, I didn't see that response.
Adam Flanagan
8,022 PointsChris Howell
Python Web Development Techdegree Graduate 49,702 PointsFrom the image you put up you are missing one line of code to link the style.css file.
link rel="stylesheet" href="style.css" type="text/css" media="screen"
...with the proper tags around the beginning and end of course.
Adam Flanagan
8,022 PointsDone this, still nothing, so I've decided to just download the project files then get caught up. Thanks any guys.
Noah Teitelbaum
203 PointsSo as to not flood your forum with different threads on the same question, I'm having a similar issue and I'm pretty sure it's because I haven't set up the folder structure correctly in sublime (2).
First I have my index.html file, and then underneath it begins my folders, which I created by dragging them in. From the lesson, it seems that I should have them all in one folder, but I can't drag the index.html file down.
I now see why my images didn't work unless I used the location where I downloaded the project file. Hopefully I can resolve that too!
Thanks for any help.
James Barnett
39,199 PointsDue to the way the best answer
function works and how points get assigned to the writer of the best answer we strongly prefer you to create your own thread.
Remember the basic rule of thumb:
- Your issue
- Your Code
- Your Thread
James Barnett
39,199 Points- Read this tutorial on file organization
- Read this tutorial on [relative vs absolute paths]((http://www.uvsc.edu/disted/decourses/dgm/2120/IN/steinja/lessons/06/06_04.html))
- If you are still having trouble at this point, triple check the spelling and capitalization of the file name and it's entire path.
If after doing of all that, you are still having trouble ...
Take a screen shot (and post it here) of your file structure it should look something like this:
Make sure it's a screen shot of the actual file structure and not of your sublime text project.
gareth connop
14,865 Pointsgareth connop
14,865 PointsHi Adam,
Try this:
html <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>Smells Like Bakin' Cupcake Company</title> <link rel="stylesheet" href="css/normalize.css" type="text/css" media="screen"> <link rel="stylesheet" href="css/grid.css" type="text/css" media="screen"> <link rel="stylesheet" href="css/style.css" type="text/css" media="screen"> <link href='http://fonts.googleapis.com/css?family=Nunito:400,300,700' rel='stylesheet' type='text/css'> </head>