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 - ID Selector

I'm having difficulty passing this one!

according to me it is

copyright {

border: 8px 0 0 0;
color: #2A0400

}

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

ID is copyright in html.

Any help will be appreciated. Thanks in advance!

10 Answers

The id selector is CSS is a #

The class selector is a .

So it should be:

#copyright {
    your code here
}

You need to use the hash tag "#" to select an ID. So it would be

#copyright {...}

EDIT: Kevin Korte has you covered :)

This is what i typed. ---> " #copyright { border: 8px 0 0 0; color: #2A0400 }" <---

With #copyright { border: 8px 0 0 0; color: #2A0400 }

Thanks in advance :)

Also, it may not fail you on the console here, but to have proper semantics you need a ; (colon) after every line of CSS. You're missing it after you state your color.

Question : Select the copyright using an ID selector and give it a solid top border that is 8 pixels thick and has a color of #2A0400.

Answer #copyright { border: 8px solid; color: #2A0400; }

After checking my work i got this error message saying (please see below)

Bummer! The border should only be applied to the top of the copyright. You can 'border-top' to make that happen.

After adding -top to border tag .. i did pass .. thank you guys!

This is like a real classroom where i can share and learn from others :)

Thanks again Kevin and brendan

Border will be applied to all 4 sides.

Border-top will only be applied to the top edge of the div.

Since it wants you to only apply the border to the top of the div, change your "border" to "border-top" and you should pass.

Thanks :D

No problem, good luck with your next quiz :)