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


flex box issues

I've been playing around with flex box. I created a 9 x9 gallery of images, and with some help through the forum created one and it looked great.

However i then decided that i wanted to add some text on top of the images. A small caption for each one.

I Thought the best way to do this would be to wrap each img in a <figure> and then add a <figcaption>, and position the caption over the image.

As soon as i put the img inside a <figure> tag things went a little strange, i know can't really work out how to fix this.

here's a link to the codepen http://codepen.io/Petecass/pen/bdwMom



ok seemed to have fixed the issue. just needed to state

img { max-width 100%} in css

but why is that when i set the position of figcaption to relative. the figcaption is still outside of the image?