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

why my pic can't be in the same high?

I am not sure where did I make mistake which can't make my image at the same line.

here is the page:http://port-80-niv909xorv.treehouse-app.com/

here is my code:https://teamtreehouse.com/workspaces/15603072#

1 Answer

The nav element likes to float right and does not have a 100% width at all sizes. This means there can be space to the left of the nav element. When there is space, the first image floats into that area. There isn't room for the second image so it has to float lower.

One way to fix this would be to make sure nav is always 100% width.

Another way would be adding a class to the HTML so you can use a bit of CSS to clear the floats. For example...

<section class="clear-both">...</section>
.clear-both {
    clear: both;
}

There are lots of other solutions too so don't feel like you have to use any of the above. CSS is like a jigsaw puzzle with pieces that fit in more than one direction. brain explodes

Cheers!

Thank you so much!! I fixed it.