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 How to Make a Website Styling Web Pages and Navigation Style the Portfolio

list-style: none

Why does list-style: none; not work inside of my #gallery {} property? It will only work under - #gallery ul {}

2 Answers

Using #gallery ul { list-style: none; } is targeting anything inside the Unordered List (you are being specific), whereas the cascading doesn't target the ul inside the #gallery. As a test in your CSS try making 4 declarations: 1 for #gallery 2 for #gallery ul 3 for ul 4 for li and use the list-style: none; in each one. Then comment all of them out and uncomment them one by one while leaving the others commented out.and look at your results. Notice if you have the li uncommented it takes away the bullet points.

"Using #gallery ul { list-style: none; } is targeting anything inside the Unordered List (you are being specific), whereas the cascading doesn't target the ul inside the #gallery" That makes sense, but it is not the way they show it in the video. He targets only #gallery{}- Thanks for the help though.