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

ID 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

You need to include solid in the between 8px and #2A0400 like this:

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

True true. Thanks Chase, I'll remember that when I resubmit.

It looks like you didn't put a '#' before the 'copyright' identifier.

It should look like: #copyright{ border-top: 8px #2A0400; }

Jason, 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!

Lol, 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! :)

That's because I reformatted Kim's code. You can find out how I did it here.

I'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

Try taking out:

padding: 10px 0px;
margin: 15px 0px;
text-align: center;

Thanks Chase. I refreshed and tried it again without removing anything and it worked this time. Not sure why because I didn't change anything.

May 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!

Stuff like that happens a lot. It's probably a bug or something.

I'm a tag away if that didn't help.

Thanks Chase. Treehouse rocks!

Chase James I think you and Kevin Korte are my 2 favorite people to answer questions on here. You guys rock :guitar:

Thanks 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.

Thanks James Barnett! That really means a lot. :smile: