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

General Discussion

Creating my first website and CSS is unresponsive

So I started working on creating a website for my parents' company today and when i went into the browser the html is fine but I'm not seeing the css styling. I've used the html and css validator and it says everything is fine. I've cleared my cache. I've taken suggestions from blogs and forums. Nothing is working. I was really excited to start working on my first project but now I'm feeling discouraged and frustrated. Can anyone help?

did you put your style inside the html file or in a different file (external CSS )?

7 Answers

yes i did

Can you post or link to your code(If it is very large)?

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Tash-De Marketing</title>
    <link rel="stylesheet" href="css/main.css"> 
</head>

<body>
  <div class="nav">
    <div class="container">
      <ul>
        <li>Create Account</li>
        <li>Customer Login</li>
      </ul>
    </div>
  </div>

 <div class="menu">
  <div class="container">   
    <ul>
        <li>Home</li>
        <li>About</li>
        <li>Products</li>
        <li>Contact Us</li>
    </ul>
  </div>
 </div>

 <div class="h1">
    <div class="container">
      <div>
        <h3>Heading 1</h3>
      </div>    
      <div>
        <h3>Heading 2</h3>
     </div>
    </div>
 </div>

    <div class="footer">
        <footer>
            <p>&copy;2014 Tash-De Marketing Ltd.</p>
            <p>Website designed and developed by Deborah Williamson</p>
        </footer>
     </div>
  </body>   
</html>

there isn't much css though.

.nav {
 font-size: 11px;
 color: green;
}

Your code works! the font became smaller and turned green!

I tested your code and everything worked great! Is it possible you have misnamed your css or given it the wrong file type or put it in the wrong folder? Is the css folder in the same directory as the html file?

My file tree looks like this for reference.

index.html css/ main.css

This is screen shot of what i have. I'm almost sure I have everything where its suppose to. But I could be wrong.

http://www.picresize.com/popup.html?images/rsz_sublime_text.bmp

Your html file is in a folder called img.

Move it out of that folder and onto the same level as the css folder and you will be fine.

It worked! I can't believe I messed that up. Thank you so much!

Hi Deborah!

Please remember to mark a best answer in this thread so other Treehouse members know your problem has been solved!

I'm glad you managed to get your issue resolved, good luck with the rest of your site!

-Luke

Glad that fixed it! I made that mistake a few times when I started out so don't worry about it. File structure can get tricky thats why that column on the left shows you where everything is. That will make it alot easier when you get into more complex links.

Goodluck! --Ricky