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 Basics Basic Selectors ID Selectors

Jonathan Diaz
seal-mask
.a{fill-rule:evenodd;}techdegree
Jonathan Diaz
Data Analysis Techdegree Student 30 Points

ID Selector in Ul

This is in regards to the coding starting at 3:50 in the video. Can you add the ID selector in the section instead of ul in the index.html for the skills section?

2 Answers

Hi Jonathan!

You could give the section the id instead, but it would give slightly different results.

The background color would be for the whole section, including the "Skills" h2 heading.

If you wanted the very same results, you have to target the ul like this in the CSS instead:

#skills-list ul {
  /* styles */
}

And given the id is "skills-list", it makes more sense to give the id to the list itself.

Otherwise , this would make more sense:

#skills-section ul {
  /* styles */
}

Does that make sense?

I hope that helps.

Stay safe and happy coding!