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 can I get an aside and a section to sit side by side, aside on the left and section on the right?

I have a header followed by an aside on the left. I am trying to get a section to sit to the right of the aside. The section has a ul for portfolio pics. It works if I float the section to the right, but shouldn't I be floating it to the left?

2 Answers

geoffrey
geoffrey
28,736 Points

Both actually works, If I understand what you ask.

Here is a link to a quick test I did http://codepen.io/anon/pen/Dkocj Set the section to right, and It will float as It should to the right.

Thanks, that is how I thought it should work. My section fills up the whole right side, so I guess float right or left doesnt matter. For smoe reason on my code, the float left drops it beneath

geoffrey
geoffrey
28,736 Points

Maybe if you could share your code we could help you to see why it drops it beneath when using float left.