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


Quick help with Foundation

Hey guys,

I hope you are great.

I want to wrap the text from <p> around the image in the last row, how can I float the image or text to achieve this? I tried using the class "left" on the image but didn't work.

Link: http://982px.com/morefoundation/


1 Answer

J.T. Gralka
J.T. Gralka
20,126 Points

Hey Ibrahim Rodrí­guez,

You need to select the images in the divs with class large-4 contained in the div with row class, and then you need to float the images with some padding on the right...

    div.row > div.large-4 img{
       float: left;
       padding-right: 5px;

Hi J.T. Gralka, thanks for your help.

So, what if I have another class 'large-4' with an image in my design? In that case, should I assign a custom/specific class to that div?

Thanks again!

J.T. Gralka
J.T. Gralka
20,126 Points

You could specify an id for the div you want to float the images for, or if you always know that you want to float the images in the last row, you could look into using the :last-child pseudo-class on the div.row class selector.

Oh that make sense. I wish I could figure these things out that fast.

Thanks J.T. Gralka, I appreciate your help.

J.T. Gralka
J.T. Gralka
20,126 Points

It's really no problem! You're quite welcome! :-)

I'm just curious: have you checked out the CSS Foundations adventure here on Treehouse? There's a lot of useful nugets of information in regards to CSS there. You might find it really helpful -- not to mention, Guil Hernandez just added a new module on media queries!