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
Sher K
Courses Plus Student 1,316 PointsCSS - 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
Kevin Korte
28,149 PointsThe id selector is CSS is a #
The class selector is a .
So it should be:
#copyright {
your code here
}
Brendan O'Brien
9,066 PointsYou need to use the hash tag "#" to select an ID. So it would be
#copyright {...}
EDIT: Kevin Korte has you covered :)
Sher K
Courses Plus Student 1,316 PointsThis is what i typed. ---> " #copyright { border: 8px 0 0 0; color: #2A0400 }" <---
Sher K
Courses Plus Student 1,316 PointsWith #copyright { border: 8px 0 0 0; color: #2A0400 }
Sher K
Courses Plus Student 1,316 PointsThanks in advance :)
Kevin Korte
28,149 PointsAlso, 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.
Sher K
Courses Plus Student 1,316 PointsQuestion : 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
Kevin Korte
28,149 PointsBorder 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.
Sher K
Courses Plus Student 1,316 PointsThanks :D
Brendan O'Brien
9,066 PointsNo problem, good luck with your next quiz :)