-1

I want on desktop show all cols (5) on mobile only 3. It's possible do with standart bootstrap classes ?

 <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
       <div class=" col-lg-2 col-md-2 col-centered " style="text-align: center; margin-right: 10px; overflow: hidden">
          <a href="">
          <img src="http://192.168.0.185/image/cache/data/pigu_final-100x100.png" alt="">
          </a>
       </div>
       <div class=" col-lg-2 col-md-2 col-centered " style="text-align: center; margin-right: 10px; overflow: hidden">
          <a href="">
          <img src="http://192.168.0.185/image/cache/data/gelezinis_final1-100x100.png" alt="">
          </a>
       </div>
       <div class=" col-lg-2 col-md-2 col-centered " style="text-align: center; margin-right: 10px; overflow: hidden">
          <a href="">
          <img src="http://192.168.0.185/image/cache/data/teo_final-100x100.png" alt="">
          </a>
       </div>
       <div class=" col-lg-2 col-md-2 col-centered " style="text-align: center; margin-right: 10px; overflow: hidden">
          <a href="">
          <img src="http://192.168.0.185/image/cache/data/teo_final-100x100.png" alt="">
          </a>
       </div>
       <div class=" col-lg-2 col-md-2 col-centered " style="text-align: center; margin-right: 10px; overflow: hidden">
          <a href="">
          <img src="http://192.168.0.185/image/cache/data/teo_final-100x100.png" alt="">
          </a>
       </div>
    </div>
Wizard
  • 10,985
  • 38
  • 91
  • 165
  • Look into the usage of `hidden-xs` and `visible-*` (where * is replaced with your desired size (xs, sm, md or lg)) – Tim Lewis Oct 20 '15 at 13:47
  • 2
    Possible duplicate of [Twitter bootstrap hide element on small devices](http://stackoverflow.com/questions/19659726/twitter-bootstrap-hide-element-on-small-devices) – BENARD Patrick Oct 20 '15 at 14:06

1 Answers1

1

Yes you can do by hidden-xs class: Please check codepen for this: codepen.io/anon/pen/JYMNvj

  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
       <div class=" col-lg-2 col-md-2 col-centered " style="text-align: center; margin-right: 10px; overflow: hidden">
          <a href="">
          <img src="http://192.168.0.185/image/cache/data/pigu_final-100x100.png" alt="">
          </a>
       </div>
       <div class=" col-lg-2 col-md-2 col-centered " style="text-align: center; margin-right: 10px; overflow: hidden">
          <a href="">
          <img src="http://192.168.0.185/image/cache/data/gelezinis_final1-100x100.png" alt="">
          </a>
       </div>
       <div class=" col-lg-2 col-md-2 col-centered " style="text-align: center; margin-right: 10px; overflow: hidden">
          <a href="">
          <img src="http://192.168.0.185/image/cache/data/teo_final-100x100.png" alt="">
          </a>
       </div>
       <div class=" col-lg-2 col-md-2 hidden-sm hidden-xs col-centered " style="text-align: center; margin-right: 10px; overflow: hidden">
          <a href="">
          <img src="http://192.168.0.185/image/cache/data/teo_final-100x100.png" alt="">
          </a>
       </div>
       <div class=" col-lg-2 col-md-2 hidden-sm hidden-xs col-centered " style="text-align: center; margin-right: 10px; overflow: hidden">
          <a href="">
          <img src="http://192.168.0.185/image/cache/data/teo_final-100x100.png" alt="">
          </a>
       </div>
    </div>

It will hide last two column on small and mobile device You can remove hidden-sm if you want to make it visible on small device

Ubiquitous Developers
  • 3,637
  • 6
  • 33
  • 78