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
Sebastian Andersson
7,468 PointsTrying 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.
1 Answer
Tiffany McAllister
25,806 PointsA 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 :)
Sebastian Andersson
7,468 PointsThat's fine when only having two columns, but when adding multiple it breaks. Like this:
Tiffany McAllister
25,806 PointsSorry, I forgot to wrap the columns in a row. I've fixed my codepen and added a second sidebar div.
Tiffany McAllister
25,806 PointsTiffany McAllister
25,806 PointsSorry, I may have misread your question. How many columns are you wanting?