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 Customizing Colors and Fonts Use Classes in CSS

Stephen Poole
Stephen Poole
9,361 Points

"Hover feature", "nav a.selected", and "nav a set to white", are all NOT working! Please help! No idea what's wrong!

CSS code is:

/*******************************
GENERAL
*******************************/

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



/*******************************
HEADING
*******************************/

#logo {
  text-align: center;
  margin: 0;
}

h1 {
  font-family: 'Changa One', sans-serif;
  margin: 15px 0;
  font-size: 1.75em;
}



/*******************************
COLOUR
*******************************/

body{
  background-color: #fff;
  color: #999;
}


header {
  background: #6ab47b;
  border-color: #599a68;
}

nav {
  background: #599a68;
}


h1, h2 {
  color: #fff;
  text-decoration: none;
}

a {
  color: #6ab47b;
  text-decoration: none;
}

nav a, nav a:visited {
  color: #fff;
}

nav a.selected, nav a:hover{
  color: #32673f;
}

HTML code is:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Stephen Poole | EE Intern</title>
    <link rel="stylesheet" href="css/normalize.css">
    <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700|Changa+One' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" href="css/main.css">
  </head>
<body>
  <header>
    <a href="index.html" id="logo">
      <h1>Stephen Poole</h1>
      <h2>Designer</h2>
    </a>
    <nav>
      <ul>
        <li>
          <a href="index.html" class="selected">Portfolio</a>
        </li>
        <li>
          <a href="about.html">About</a>
        </li>
        <li>
          <a href="contact.html">Contact</a>
        </li>
      </ul>
    </nav>
  </header>

  <div id="wrapper">
    <section>
      <ul>
        <li>
          <a href="img/numbers-01.jpg">
            <img src="img/numbers-01.jpg" alt="">
            <p>Experimentation with colour and texture</p>
          </a>
        </li>
        <li>
          <a href="img/numbers-02.jpg">
            <img src="img/numbers-02.jpg" alt="">
            <p>Experimentation with kids logo</p>
          </a>
        </li>
        <li>
          <a href="img/numbers-06.jpg">
            <img src="img/numbers-06.jpg" alt="">
            <p>Experimentation with belly butter logo</p>
          </a>
        </li>
        <li>
          <a href="img/numbers-09.jpg">
            <img src="img/numbers-09.jpg" alt="">
            <p>Experimentation with colour and texture</p>
          </a>
        </li>
        <li>
          <a href="img/numbers-12.jpg">
            <img src="img/numbers-12.jpg" alt="">
            <p>Experimentation with colour and texture</p>
          </a>
        </li>
      </ul>
    </section>

      <footer>
        <a href="http://twitter.com/gunitunes">
          <img src="img/twitter-wrap.png" alt="Twitter Logo">
        </a>
        <a href = "http://facebook.com/stephenpoole">
          <img src="facebook-wrap.png" alt="Facebook Logo">
        </a>
        <p>&copy; 2015 Stephen Poole</p>
      </footer>
    </div>
  </body>
</html>

Hi Stephen,

Nothing is standing out right now looking at your code.

Can you post a snapshot of your workspace?

https://teamtreehouse.com/forum/workspace-snapshots

Stephen Poole
Stephen Poole
9,361 Points

Hi Jason, great idea. I didn't know about this feature. Anyways, here is the link. I have gone through my code so many times and have no idea whats wrong. I can't even get the colours to stay constant from one video to the next...

https://w.trhou.se/8s7f3346q0

Stephen Poole
Stephen Poole
9,361 Points

Hi Jason,

I actually figure it out! When I was putting comments into my CSS, I was using <!-- ... --> instead of /* ... */. This was somehow screwing everything up. Thanks!

Glad you figured it out! Sorry I didn't get to it sooner. I just checked your workspace and saw that you were using html style comments instead of css.

An error like that will cause the next css rule to be completely ignored.