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

HTML How to Make a Website Styling Web Pages and Navigation Style the Portfolio

Anwar Rizalman
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Anwar Rizalman
Python Development Techdegree Graduate 33,620 Points

Is it necessary to set margin and padding to 0 for #gallery selector?

So you set a value of 0 to margin and padding inside the #gallery selector, I am wondering what is the default margin & padding value here? If it's default values are 0, will it be ok if I did not declare this inside the #gallery selector?

1 Answer

Hi Anwar, In short, yes, it is necessary because the ul has a default indent. If you comment out the margin and padding declarations, save the document, then refresh your preview page and watch carefully you will see the photos jump slightly to the right.

Let me know if that was helpful.