G
G
green1762016-03-17 18:37:13
css
green176, 2016-03-17 18:37:13

Bootstrap 3 element positioning?

In bootstrap, if the elements don't fit on the screen, then the right element falls under the left element. Is it possible to do the opposite, so that the right one floats over the left, but not for all elements, but for certain ones?
For example: 2 blocks

<div class="container">
            <div class="row">
                <div class="col-md-5" style="background-color:red;height:500px"></div>
                <div class="col-md-7" style="background-color:green;height:500px"></div>
            </div>
        </div>

It looks like this more than 998px in width
ff54777009c94d9ca8ef1997a2a1d0c6.png
With a width less than 1200px
75b7afd34ad643c5ad24993ebfb34394.png
I want it to be the other way around, like this
d199121c846b4db98fb378c7f79f249a.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
Oleg, 2016-03-17
@green176

Swap the columns in the code, those that should be on the right - float: right

G
green176, 2016-03-17
@green176

won like this, maybe someone needs it

<div class="row">
  <div class="col-md-5 col-md-push-7" style="background-color:red;height:500px">

  </div>
  <div class="col-md-7 col-md-pull-5" style="background-color:green;height:500px">
  </div>
</div>

992c4b0d2c074146b02534d234be0cef.png5a8ee6f1bfbc4fdc9d9eadd2bfd5f946.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question