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 Make a CSS Image Gallery

Stuck on Challenge Task 2 of 4 in Navigating Web Pages & Navigation

The challenge asks me to: "Select the element with the ID gallery. Then, remove the margin, padding, and bullet points." My answer is:

#gallery li a {
  margin: 0;
  padding: 0;
  list-style: none;
}

However, it says this is incorrect; specificly, "Bummer! It looks like at least one side has no margin. Be sure you set all sides to zero margin."

How do I set "all sides to zero margin?" Where did I go wrong? Please give me a hint. Thank you!

2 Answers

Hi Ronald, I went ahead and fixed code highlighting for you. What you have is fine, and here's a hint: you can leave out the li and a selectors.

Thanks Dustin ... how did you turn on the code highlighting? It looks great!

Here's an animation to help with that :smiley:

Code Highlighting on the Treehouse Forum

Kate Hoferkamp
Kate Hoferkamp
5,205 Points

The only selector that the code challenge is looking for is #gallery

Your code for part two should look like this:

#gallery {
  margin: 0;
  padding: 0;
  list-style: none;
}

Thanks for your reply. I fussed around with the coding a bit longer and figured it. I'm learning that careful attention to syntax is really important.

Kate Hoferkamp
Kate Hoferkamp
5,205 Points

Exactly! It makes all the difference! The good and bad of coding I suppose. Glad you got it! Good luck!