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

HTML Build a Simple Website Styling Content Finishing the CSS

Dallas Bille
Dallas Bille
2,613 Points

Id selector

For one of my quiz questions i am trying to use the ID selector to select copyright.

But #copyright shows up in pink instead of the normal color under the CSS.

5 Answers

Dave McFarland
STAFF
Dave McFarland
Treehouse Teacher

The pink color is OK. In the Treehouse HTML editor, element selectors appear as a grayish color, class selectors as brown, and ID selectors as Pink. I tried this code and it passed:

\#copyright {
    border-top: solid 8px #2A0400; 
}

Try the challenge again from the beginning and see if it works.

Dave McFarland
Dave McFarland
Treehouse Teacher

ignore the forward slash before #copyright. If I didn't add it the markdown syntax treated copyright like a h1 tag, and for some reason, the forum doesn't strip out the forward slash. Not sure how the markdown works in the forum posts, yet.

Lauren Clark
Lauren Clark
33,155 Points

Hey Dallas, can you show us the code you have?

Dallas Bille
Dallas Bille
2,613 Points

Heres the question, Select the copyright using an ID selector. Give it a solid top border that is 8 pixels thick and has a color of #2A0400.

I should be pulling the HTML code using the CSS ID right?

The HTML code is div id="copyright" so shouldn't the CSS ID selector be #copyright {border-top: 8px #2A0400;}?

Dallas Bille
Dallas Bille
2,613 Points

this is the code

div id="copyright" class="grid_12" <p>Ā© 2012 Smells Like Bakin' Cupcake Company. All Rights Reserved.</p> /div

Dallas Bille
Dallas Bille
2,613 Points

awesome thank you!