Bootstrap 3: place the sidebar on the left, but have it under the content when it crashes

I am developing a website using Twitter Bootstrap 3 and I have two problems:

  • how can I place the sidebar on the left on large screens, but if it was placed under the content when the page crashed?

This, for example, is my structure (I had to place the sidebar to the right to collapse it down):

<div class="col-md-8"> <p>This is content, and when collapsing I want it to be placed over the sidebar! </p> </div> <div class="col-md-4"> <p>This is sidebar, and it gets down, but I would like to have it placed at the left side of the content!</p> </div> 

Thanks a lot, Ralph

+6
source share
1 answer

The pull and push classes are great for this, try:

 <div class="col-md-8 col-md-push-4"> <p>This is content, and when collapsing I want it to be placed over the sidebar! </p> </div> <div class="col-md-4 col-md-pull-8"> <p>This is sidebar, and it gets down, but I would like to have it placed at the left side of the content!</p> </div> 
+10
source

Source: https://habr.com/ru/post/954613/


All Articles