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

Why won't my html link to CSS?

<!DOCTYPE html> <html lang="en" dir="ltr"> <head> <title>Resume</title> <link rel="stylesheet" type="text/css" href="css/style.css"> </head> <body> <h3>World Guard</h3> </body> </html>

3 Answers

Steven Parker
Steven Parker
231,261 Points

It's a bit of a guess with just this part, but the HTML itself seems OK. So things I'd check are:

  • the reference is to "css/style.css" — is it really in a separate folder named "css"?
  • is the file itself named "style.css" in that folder, in all lower case?
  • check for errors in the CSS — perhaps it is linked but has a problem

When you need specific help, it's best to share the entire project. You can do that easily by using the "snapshot" function of the workspace (click the camera icon) and then post the link it gives you with the question.

Yea its all correct, I copied and pasted the directory, so idk why its broken

Steven Parker
Steven Parker
231,261 Points

Post that snapshot link and we can help you figure it out!

Im using atom, how do I do it?

Steven Parker
Steven Parker
231,261 Points

Atom, and similar tools, generally don't have the sharing ability that the Treehouse workspace does. But you could move the project into a workspace first, and then share the snapshot.

While you're moving it, you might even spot the issue yourself.

maybe use /css/style.css ? This will make the browser pic the file from the roots perspective.