Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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
220,425 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
220,425 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
220,425 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.