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

External stylesheets 'Not Found'?

Hi all,

I'm working on my responsive design project and can't for the life of me figure out why when checking the dev tools in chrome I get two errors reading:

Failed to load resource: net::ERR_FILE_NOT_FOUND

Failed to load resource: net::ERR_FILE_NOT_FOUND

^^ style.css and normalize.css

My html code is:

<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Zinamarie's Responsive Site</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" href="/css/normalize.css" type="css">
  <link rel="stylesheet" href="/css/style.css" type="css">
</head>

I tried deleting and re-coding my style.css and adding the normalize.css but it doesn't seem to work. I've cleared my cache several times and tried testing on different browsers but my external sheets are not working at all :(

Right now my style sheet doesn't contain much (just body background) as I try to figure this out. Any help greatly appreciated!! It's been a couple of weeks and I don't know what to do!

2 Answers

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,863 Points

Hey...

Sorry I missed this the first time. The type should be "text/css" and not just "css". I'm not sure if that would 'break-the-page', but give that a try too.

I hope you get it fixed up. :dizzy:

Thank you!! :D I can't believe I missed that myself, haha!

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,863 Points

Hey Zinamarie,

Without seeing your file tree, I'm going to guess.

If your HTML is in the root and your CSS folder is also in the root then your links are incorrect. You shouldn't have a slash / in front of the file name.

Try:

  <link rel="stylesheet" href="css/normalize.css" type="css">
  <link rel="stylesheet" href="css/style.css" type="css">

See if that fixes it up for you. :)

:dizzy:

Thanks for your response, Jason! Yes, they are both in the root folder - I should've specified that in my original post (: Unfortunately, that did not solve the issue.