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

How Do I Use CSS to make my gallery appear proper when length of each description is not the same.

Hey guys,

I was trying to recreate the website that we learn at "HOW TO MAKE A WEBSITE COURSE".

In that the description of each image is roughly the same length, I tried with varying descriptions. The floated elements are behaving weirdly. How do I handle this?? Please do help.

Heres the workspace i worked on. http://w.trhou.se/e7uwyc7m10

Thank you

1 Answer

Hi there Abhishek Gangadhar!

I think that they are behaving normal. Eventually it will look weird because of the content beneath image number_09.png which increase height of the element. In this kind of situation you can set either fixed height\min-height or write smaller descriptions for blocks. Or, you can add overflow-y: hidden but for this you will need fixed height(last solution wont look very good).

Best regards.

Hey Serhii,

I did try using fixed height , but it would not be effective cause it'll change with the size of the screen. So it would look too tall for mobile screens.

min-height property seems to work well :)