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

The size of the gap between images with margin in %

Hello,

I was wondering one thing. When you make a margin 2.5% to the right and left and you have floating: left; activated and there is the photos on the row. Why is the gap smaller in between them than it is on the other sides of them. It should be 5% in between the photos and 2.5% at the other sides. 5% > 2.5 % but the gap to the other sides with 2.5% is bigger you can see that on the video https://teamtreehouse.com/library/how-to-make-a-website/styling-web-pages-and-navigation/style-the-portfolio why is that so?

1 Answer

I believe there's 5% padding (left/right) on the the wrapper div containing the image gallery.

OF COURSE IT IS!! THANK YOU, I SAW THAT NOW WHEN YOU SAID SO!! :D