html - Unable to images in collapsed columns on a mobile device - bootstrap -


question background:

i have webpage features column 4 images. each column set @ col-lg-3 , col-sm-12 respectively. implementing media queries resize images when site used on mobile devices.

the issue:

the images evenly space when viewed on pc or on mobile device when held horizontally when viewed on device in portrait style images no centering in divs.

this page when viewed on pc or on device horizontally:

enter image description here

this when viewed on device held in portrait fashion:

enter image description here

code:

this html markup images:

<div class="productlogo">     <div class="container">         <div class="row">             <div class="col-lg-3 col-sm-12 text-center" style="padding-top:5px; padding-bottom:5px; width:25%;"><img class="img-responsive" src="~/images/camaroweb.png" /></div>             <div class="col-lg-3 col-sm-12 text-center" style="padding-top:15px; padding-bottom:15px; width:25%;"><img class="img-responsive" src="~/images/axminster.png" /></div>             <div class="col-lg-3 col-sm-12 text-center" style="padding-top:15px; padding-bottom:15px; width:25%;"><img class="img-responsive" src="~/images/gerflor.png" /></div>             <div class="col-lg-3 col-sm-12 text-center" style="padding-top:15px; padding-bottom:15px; width:25%;"><img class="img-responsive" src="~/images/altro.png" /></div>         </div>     </div> </div> 

productlogo class:

.productlogo {     background-color: #335cad;     padding-top: 20px;     padding-bottom: 20px;     width:100%; } 

if can advise me on how images center in divs on mobile device great

try switching col classes build mobile-first perspective.

<div class="productlogo">   <div class="container">       <div class="row">           <div class="col-sm-12 col-lg-3 text-center" style="padding-top:5px; padding-bottom:5px; width:25%;"><img class="img-responsive" src="~/images/camaroweb.png" /></div>           <div class="col-sm-12 col-lg-3 text-center" style="padding-top:15px; padding-bottom:15px; width:25%;"><img class="img-responsive" src="~/images/axminster.png" /></div>           <div class="col-sm-12 col-lg-3 text-center" style="padding-top:15px; padding-bottom:15px; width:25%;"><img class="img-responsive" src="~/images/gerflor.png" /></div>           <div class="col-sm-12 col-lg-3 text-center" style="padding-top:15px; padding-bottom:15px; width:25%;"><img class="img-responsive" src="~/images/altro.png" /></div>       </div>   </div> </div> 

Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -