Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML How to Make a Website Styling Web Pages and Navigation Style the Image Captions

Ivan Kusakovic
Ivan Kusakovic
12,197 Points

Resizing issues

This is when I resize browser to be small,

first picture: http://imgur.com/8cetVN7

second image (when I resize little more, to the end) http://imgur.com/OD4UHp4

As you can see, one image is floated somewhere, I don't get it why?

Please help.

5 Answers

I think you are using a different font than Nick, thus his first image's caption never occupies more lines than the second's the way yours does.

I can't be sure without seeing your code, but this is probably a matter of luck rather than coding difference.

Ihor Zhuk
Ihor Zhuk
13,263 Points

It seams you used floats for your posts with images.
There are a few solutions:

  • specify equal heights for your posts with images

  • use inline-block instead of floats

You can read about this issue here: https://www.ruzee.com/blog/2007/05/align-list-items-horizontally-with-css/

Ivan Kusakovic
Ivan Kusakovic
12,197 Points

I don't get it because I worked everythings same as Nick in videos, and when he resizes window that doesn't happen. My code is identical to Treehouse's code.

Nevermind, Nick's does this too: See video at 2:18.

Ivan Kusakovic
Ivan Kusakovic
12,197 Points

I just get back from neighboor and there I tried this code and works fine. It's some error with my computer...