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

main.css is not linking to index.html How can I fix this?

Here is a link to my file structure: http://teamtreehouse.com/workspaces/1040212#

In css are normalize.css and main.css In img are my image files I also have a non-folder called image.html for my code as in the video

Here is the code from head of index.html <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Joni Carlson | Designer</title> <link rel="stylesheet" href="ccs/normalize.css"> <link rel="stylesheet" href="ccs/main.css"> </head> <body> <header> <a href="index.html" id="logo"> <h1>Joni Carlson</h1> <h2>Designer</h2> </a> <nav> <ul> <li><a href="index.html">Portfolio</a></li> <li><a href="about.html">About</a></li> <li><a href="contact.html">Contact</a></li> </ul>

    </nav>

Here is the code from main.css a { text-decoration: none; }

wrapper {

max-width: 940px; margin: 0 auto; padding: 0 5%; }

logo {

text-align: center; margin: 0; }

arg...it rendered my code in the browser. Any way around that?

2 Answers

I don't think I can view your workspace. Did you make sure your link looks like this inside your index.html file?

<link rel="stylesheet" href="css/main.css">

Assuming that your image.html (or index.html ?) file is located in the project's root, you can simply include the CSS file using

<link rel="stylesheet" href="css/main.css">

If it's located in a subdirectory of the root you have to use the following line:

<link rel="stylesheet" href="../css/main.css">