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
Matt Carey
1,397 PointsCode Challenge: Finishing the CSS (id selector?)
The challenge says
"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."
I am adding
#copyright{
margin-top:8px;
color:#2A0400;
}
to the bottom of the style.css file, but I get the error: "Remember, to select an ID, use the '#' character followed by the ID of the element you want to select."
I have the code formatted like what was seen in the tutorial, but am I missing something else? Thanks much for your help! (And sorry if this is the wrong thread)
8 Answers
Kevin Korte
28,149 PointsYes, you are missing the id selector, which is a # and should be placed right before the word copyright.
Matt Carey
1,397 PointsOh, I think the text editor for this turned the font bold after the # I put in.
copyright{
margin-top:8px; color:#2A0400; }
Matt Carey
1,397 PointsI am typing a # before copyright but nothing is showing, sorry!
Kevin Korte
28,149 PointsThat's alright Matt, as long as you know it should be
#copyright
I didn't read the very top where you posted the directions. That is where your mistake is.
Margin just creates a barrier of space around the element. It pushes other elements away from it by whatever the margin is set to.
It wants you to set a top border of 8px think, that is solid, and has the color #2A0400.
Instead of me just giving you the code, go back to that video and watch how they set the top border.
And than mimic that code with the solid line weight, thickness, and color the directions on the code challenge specify.
Let me know how you do with that
Matt Carey
1,397 PointsOkay, I re-watched the video and came up with this #copyright{ border-top:8px solid color:#2A0400; } The text in the editor for #copyright is pink (not they grayish color like in the video). Do you think there is some syntax issue? Thanks so much for your help Kevin!
Kevin Korte
28,149 PointsIt appears you are missing a colon after between your border-top and color declarations.
Matt Carey
1,397 PointsThank you! You are awesome Kevin!
Kevin Korte
28,149 PointsYou are welcome, thank you