html - In Bootstrap 3, how can I turn a row of columns into a dropdown in mobile view? -


i have row of 5 graphics text on them. in mobile view, want set media query 5 graphics turn dropdown text. example, image 1 says "personal capability", image 2 says "leading change", etc. on mobile view, want graphics go away , dropdown have options "personal capability", "leading change", etc.

my html:

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" />  <div class="row" style="margin:1%">    <div class="col-xs-1">    </div>    <!--end col-sm-1-->    <div class="col-xs-2">      <a href="#">        <img src="http://placehold.it/150x150" class="img-responsive" title="personal capability" style="border:0">      </a>    </div>    <!--end col-sm-2-->    <div class="col-xs-2">      <a href="#">        <img src="http://placehold.it/150x150" class="img-responsive" title="leading change" style="border:0">      </a>    </div>    <!--end col-sm-2-->    <div class="col-xs-2">      <a href="#">        <img src="http://placehold.it/150x150" class="img-responsive" title="character" style="border:0">      </a>    </div>    <!--end col-sm-2-->    <div class="col-xs-2">      <a href="#">        <img src="http://placehold.it/150x150" class="img-responsive" title="interpersonal skills" style="border:0">      </a>    </div>    <!--end col-sm-2-->    <div class="col-xs-2">      <a href="#">        <img src="http://placehold.it/150x150" class="img-responsive" title="focus on results" style="border:0">      </a>    </div>    <!--end col-sm-2-->    <div class="col-xs-1">    </div>    <!--end col-sm-1-->  </div>  <!--end row-->

bootstrap provides responsive utilities. there classes can use hide or show according screen.

if understand problem, want display on mobile , other things on other devices.

bootstrap has you, visible , hidden classes.

in jsfiddle, can find out example of classes : https://jsfiddle.net/valentinho14/9f4b53yw/

in addition, please don't use empty block push content, :

<div class="col-xs-1"></div> 

it better if choose use classes created that(offset) :

<div class="col-xs-2 col-xs-offset-1">     content </div> 

to have more informations that, please check official bootstrap's doc : http://getbootstrap.com/css/#responsive-utilities


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -