I have the following layout on a page:
On the left I have the desktop (lg) version, And on the right the reordering that I want to have on the small devices.
With this code:
<div class="row">
<div class="col-sm-6 col-sm-push-6">
<div class="alert alert-danger"><h1>Lorem Ipsum (2)</h1>
<br>
Rostfreie Bohrbefestiger für Stahl- und Aluminiumunterkonstruktionen </div>
</div>
<div class="col-sm-6 col-sm-pull-6">
<div class="alert alert-info">Image (1)
<p></p>
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.<p>
<p>At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata .</p>
<p></p>
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.<p>
<p>At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata .</p>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 col-md-offset-6 col-sm-6 col-sm-offset-6 col-lg-offset-6">
<div class="alert alert-info">Description (3)</div>
</div>
</div>
I get a Problem with the desktop view:
see printscreen:
Any proposals to fix that problem and to show the description element (3) direct under element “2” are welcome.
Thanks a lot.
3
Answers
Try adding
col-xs-12
in your divs. Your div will take all the width on small devices:Try the following:
This is one solution with Flexbox and JQuery
Fiddle