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
Kim Campbell
757 PointsID Selector Code Challenge: Not sure where the error is
Hi everyone!
So, it's the final code challenge. I've been instructed to do this:
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.
So I entered this code:
#copyright{
border-top: 8px #2A0400;
}
And received this message: Bummer! Remember, to select an ID, use the '#' character followed by the ID of the element you want to select.
Any ideas on what I'm doing wrong?
3 Answers
Chase Lee
29,275 PointsYou need to include solid in the between 8px and #2A0400 like this:
#copyright{
border-top: 8px solid #2A0400;
}
Joshua Moore
9,911 PointsIt looks like you didn't put a '#' before the 'copyright' identifier.
It should look like: #copyright{ border-top: 8px #2A0400; }
Kim Campbell
757 PointsJason, there is a hashtag before copyright...isn't there? The only difference between what we wrote looks like formatting to me.
lol, still not sure what I'm missing!
Joshua Moore
9,911 PointsLol, sorry, you're right. For some reason when I first read the question, my computer wasn't displaying the Hashtag.
The error message suggests that the ID selector is somehow wrong though, which is strange.
Good Luck! :)
Chase Lee
29,275 PointsThat's because I reformatted Kim's code. You can find out how I did it here.
Eric Will
6,318 PointsI'm also struggling with this one and getting the same error the OP is getting.
My code looks like this:
#copyright {
border-top: 8px solid #2A0400;
padding: 10px 0px;
margin: 15px 0px;
text-align: center;
}
I keep getting this error "Bummer! Remember, to select an ID, use the '#' character followed by the ID of the element you want to select".
The element is "copyright" and I've used the '#' character, but I keep getting the same error. I've tried to think this through as I didn't want to be given the answer but I'm stomped.
Would appreciate any help I could get: Thanks
Chase Lee
29,275 PointsTry taking out:
padding: 10px 0px;
margin: 15px 0px;
text-align: center;
Eric Will
6,318 PointsThanks Chase. I refreshed and tried it again without removing anything and it worked this time. Not sure why because I didn't change anything.
Kim Campbell
757 PointsMay have been a tiny inconsistency because I had a similar experience Eric. That said, treehouse is preeettyyy awesome. Impressed by how responsive the forum is!
Chase Lee
29,275 PointsStuff like that happens a lot. It's probably a bug or something.
Chase Lee
29,275 PointsI'm a tag away if that didn't help.
Eric Will
6,318 PointsThanks Chase. Treehouse rocks!
James Barnett
39,199 PointsChase James I think you and Kevin Korte are my 2 favorite people to answer questions on here. You guys rock
Kevin Korte
28,149 PointsThanks James! I remember how frustrating it was to just be stuck. I still experience that feeling on some of the RoR and JS stuff. I enjoy helping others learn to get themselves unstuck.
Chase Lee
29,275 PointsThanks James Barnett! That really means a lot.
Kim Campbell
757 PointsKim Campbell
757 PointsTrue true. Thanks Chase, I'll remember that when I resubmit.