Bummer! You must be logged in to access this page.

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

Trying to create two separate containers in bootstrap 3

Hi!

I can't seem to figure out how to create two different containers floated (or something) next to eachother, and then using media queries to remove sidebar and then put the sidebar somewhere else (like the bottom of the page).

If anything seems unclear, this is something I'm looking for: https://gyazo.com/217828b3a0e741488592dc42cb2f505a

Much appreciated.

Sorry, I may have misread your question. How many columns are you wanting?

1 Answer

A container in Bootstrap is used to wrap the whole page, so you can't put them side-by-side. You use Bootstrap's column classes to float divs. I have created a quick codepen to show you a simple example :)

http://codepen.io/tiffmc/pen/WQNerx

That's fine when only having two columns, but when adding multiple it breaks. Like this:

https://gyazo.com/758a62a4d01de76294e365f9604d89d0

Sorry, I forgot to wrap the columns in a row. I've fixed my codepen and added a second sidebar div.

http://codepen.io/tiffmc/pen/WQNerx