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 trialRobin Hood
2,382 PointsWhy does display: inline-block not work for the gallery list?
Once we implemented display:inline-block on the nav list, I tried going back and trying the same technique for the gallery image list.
I removed the clear from the footer and the float from the list, then tried to apply the inline-block instead.
However it just displays a vertical stack of the images in their 45% column, it doesn't seem to collapse down within the wrapper. Am I missing something? Should it not collapse like the nav links did?
1 Answer
Robin Hood
2,382 PointsNevermind, got it working!
I had to drop the max-width of the #gallery li to below 45% to get it to work.
Not 100% sure why though...I guess a few extra pixels come into effect when doing it that way as opposed to using a float?