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 trialMaurice Vaughn
1,419 PointsA little bit of understanding.
I Need a little bit more help understanding, What will be the parent element here? .. would it be the wrapper. ? Now the wrapper is set at 940px , we have five images that is set to a max-width of 100%; where did the 45% come from.
2 Answers
Chyno Deluxe
16,936 PointsThe parent element is the images are the list items (li tags). you are setting the widths of the li tags to 45% of the unordered list (ul gallery id).
I hope this helps.
Maurice Vaughn
1,419 PointsI got it, The light came on...lol thank you at @chyno Deluxe.
Chyno Deluxe
16,936 PointsAny time. Glad I could help.
Maurice Vaughn
1,419 PointsMaurice Vaughn
1,419 PointsThank you for your helping me lock on to the parent element which is the (ul gallery id) cool, I am still not seeing how the 45% was done.
Chyno Deluxe
16,936 PointsChyno Deluxe
16,936 PointsThe li tags are set to 45% along with other css properties so that the gallery creates a 2 column grid of all images. the images are set to max-width 100% so that it fills the entire width of its parent element.