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 How to Make a Website CSS: Cascading Style Sheets Use ID Selectors

My main.css won't integrate with my index.html

I'm trying to get my css to integrate with my html, but when I hit preview it doesn't seem to work. Here is my code as follows. Any ideas what I could be doing wrong?

main.css file:

a {
  text-decoration: none;
}

index.html file:

<!DOCTYPE html>
  <html>
    <head>
      <meta charset="utf-8">
        <title>Josh Clemence | Video + Design</title>
      <link rel="stylesheet" href="css/normalize.css">
      <link rel="stylesheet" href="css/main.css">
      </head>
    <body> 
    <header>
      <a href="index.html">
        <h1>Josh Clemence</h1>
        <h2>Video + Design </h2>
        </a>
      <nav>
      <ul>
        <li><a href="index.html">Portfolio</a></li>
        <li><a href="about.html">About</a></li>
        <li><a href="about.html">Contact</a></li>
        </ul>
      </nav>
     </header>
      <section>
        <ul>
        <li>
          <a href="img/Now Streaming.png">
          <img src="img/Now Streaming.png" alt="">
                <p>BoxCast Adverts</p>
            </a>
          </li>


        </ul>
     </section>
      <footer>
      <a href="https://www.linkedin.com/profile/view?id=162008769&trk=spm_pic"><img src="img/linked in.png" alt="linked in"></a>
        <p>&copy; 2014 Josh Clemence.</p>
        </footer>
     </body>

  </html>

2 Answers

Josh,

The link is correct syntax, but--is the path correct? Do you have a css subdirectory?

Wayne Priestley
Wayne Priestley
19,579 Points

Hi Josh,

First thing is to check for typo's, make sure your css file is main.css and not Main or any other name.
Second thing is matching the file path to your css file.
When looking at your index.html file you should see a folder called css, when you open that folder you should see your main.css file.

Hope this helps.