Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS How to Make a Website Styling Web Pages and Navigation Make a CSS Image Gallery

Select the element with the ID gallery. Then, remove the margin, padding, and bullet points.

Select the element with the ID gallery. Then, remove the margin, padding, and bullet points. I have coded it like this and it won't accept it... not sure why?? gallery ul { list-style-type: none; padding: 0px; margin: 0px; }

3 Answers

Kevin Kenger
Kevin Kenger
32,834 Points

Hey Jamie,

To target an element using its ID you need to use the hash symbol or pound sign (#) – whatever you want to call it. So your selector would be #gallery. Also, you're targeting an unordered list inside of the element, and you don't need to do that. The code should ultimately look like this:

#gallery {
  margin: 0;
  padding: 0;
  list-style: none;
}
Adam Webster
Adam Webster
24,978 Points

To select the ID, you have to use the hash symbol. So, if you type it as: #gallery ul {blah: blah blah;}, it will select the HTML item with the ID of "gallery".

Thanks! I completely over looked that.