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

CSS

My 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.

gareth connop
gareth connop
14,865 Points

Hi 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>

Tried this, still nothing?

gareth connop
gareth connop
14,865 Points

You can create a Codepen over at http://codepen.io/ for testing. Then if you post the link here, I can have a look.

gareth connop
gareth connop
14,865 Points

Thanks 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
Alan Massie
14,976 Points

Hi 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
James Barnett
39,199 Points

Adam Flanagan -

Looks 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.

OK, but there isn't much.

hmnn still nothing...

Chris Howell
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Chris Howell
Python Web Development Techdegree Graduate 49,702 Points

I 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.

latest version of chrome running on a mac

I have screenshotted my Sublime Text window how can I get that to you?

Matt Campbell
Matt Campbell
9,767 Points

Get on photobucket and then once the image is uploaded, copy one of the link urls to here. Should show up.

Chris Howell
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Chris Howell
Python Web Development Techdegree Graduate 49,702 Points

http://tinypic.com

use 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.

Chris Howell
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Chris Howell
Python Web Development Techdegree Graduate 49,702 Points

From 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.

Done this, still nothing, so I've decided to just download the project files then get caught up. Thanks any guys.

So 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
James Barnett
39,199 Points

Due 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
James Barnett
39,199 Points

Noah Teitelbaum -


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.