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 CSS Basics (2014) Basic Selectors Class Selectors

Ryan Geeting
Ryan Geeting
2,512 Points

After changing id to class , the class no longer works?

So I changed the id for the div to a class, and I changed the id in my css to .primary-content
but it dosen't seem to be working. I'm using dreamweaver so linking the code might look a little odd

<div class="primary-content">
<p>
  Lake Tahoe is one of the most breathtaking attractions located in California. It's home to a number of ski resorts, summer outdoor recreation, and tourist attractions. Snow and skiing are a significant part of the area's reputation.
</p>
<a href="#">Find out more</a>
<h2>Check out all the Wildlife</h2>
  <p>
    As spawning season approaches the fish acquire a humpback and protuberant jaw. After spawning they die and their carcasses provide a feast for gatherings of <a href="#">mink</a>, <a href="#">bears</a>, and <a href="#">Bald eagles</a>.
  </p>
        <a href="#">See the Wildlife</a>
    </div>

//There is index.html//

// And here is the Css//

.primary-content { border: 3 solid red; }

And yeah I refreshed the page and saved all files.

1 Answer

3px? or 3em? If it was working as an id, that's probably not the problem, but it's the only thing I can see that looks off... there is no unit specified for how big 3 should be.

I've also had trouble with refreshing at times... might have to save, exit, reopen or something to force the issue.