grid - How to add pull and push functionality to a column offset in Bootstrap? -
i creating section has image in 1 column , text on other. used pull/push on columns flip them when screen large. i've added col-offset 1 of columns , don't know how flip well.
how do this?
thanks
code
<div class="smartphone"> <div class="row"> <div class="smartphone-container col-md-4 col-md-offset-1 col-md-push-6 col-sm-6 col-sm-push-6"> <div id="smartphone-screenshot" class="screenshot"> <img src="img/como-funciona/smartphone1.jpg" /> </div> </div> <!-- column --> <div class="col-md-6 col-md-pull-4 col-md-pull-offset-1 col-sm-6 col-sm-pull-6"> <h2>some header</h2> <h1>other header</h1> <ul> <li> item 1.</li> <li> item 2</li> <li> item 3</li> </ul> </div> <!-- column --> </div> <!-- end row --> </div> <!-- end smartphone -->
here's simple demonstration. since offsets pushing position, don't need them if you're pulling , pushing, can use push push out more. in case, needs add 12.
demo: http://jsbin.com/hequt/1/edit

<div class="container"> before <div class="row"> <div class="col-xs-5"> column first in content </div> <div class="col-xs-5 col-xs-offset-2"> column second in content </div> </div><!--/.row--> </div><!--/.container--> <hr> <div class="container"> after <div class="row"> <div class="col-xs-5 col-xs-push-7"> column first in content </div> <div class="col-xs-5 col-xs-pull-5"> column second in content </div> </div><!--/.row--> </div><!--/.container-->
Comments
Post a Comment