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

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

Vanessa D.
Vanessa D.
914 Points

If I just have 3 pictures in my gallery[odd number], my footer will be placed on the right side next to the last photo?

If I just have 3 pictures in my gallery, or 5, or 7, and odd number, my footer which induce my Fb link or Behance link will be placed on the second column.But if I choose to have 4 6 8 pictures , even number, in my gallery, the footer is placed normally at the bottom in the middle. Is there any solution for this or am I doing something wrong here? Thanks.

1 Answer

Hi Vanessa,

If you check the video at around 8:45, you can see that Nick has the same problem. If your page looks like that then you've probably done everything right up to this point.

The reason this happens is because the gallery items are floated. Non-floated items can flow around floated items if the space allows it.

This will be fixed later, but basically the footer needs the style clear: both;

This tells the browser that it should force the footer down past all those previously floated gallery items.