responsive design - MaterializeCSS how can i make row column height the same? -


i have basic grid on materializecss problem column not same height layout became mess. know has been ask on bootstrap none of solution works me in materializecss

this jsfiddle https://jsfiddle.net/zrb46zr2/1/

<div class="row">   <div class="col m4 s6">     <img src="http://lorempixel.com/580/250/nature/1" class = "responsive-img">     <p>     looooong looooong looooong looooong looooong text     </p>   </div>   <div class="col m4 s6">     <img src="http://lorempixel.com/580/250/nature/1" class = "responsive-img">     <p>       short text     </p>   </div>   <div class="col m4 s6">     <img src="http://lorempixel.com/580/250/nature/1" class = "responsive-img">     <p>short text</p>   </div>   <div class="col m4 s6">     <img src="http://lorempixel.com/580/250/nature/1" class = "responsive-img">   </div>    <div class="col m4 s6">     <img src="http://lorempixel.com/580/250/nature/1" class = "responsive-img">   </div>   <div class="col m4 s6">     <img src="http://lorempixel.com/580/250/nature/1" class = "responsive-img">   </div> </div> 

i found simple solution requires plugin , jquery , not sure on cons of doing this.

but please feel free share own solution want fix maybe pure css

anyway code this

read , install script: https://github.com/liabru/jquery-match-height

html

<div class="row">   <div class="col m4 s6 sample">     <img src="http://lorempixel.com/580/250/nature/1" class = "responsive-img">     <p>     looooong looooong looooong looooong looooong text     </p>   </div>   <div class="col m4 s6 sample">     <img src="http://lorempixel.com/580/250/nature/1" class = "responsive-img">     <p>       short text     </p>   </div>   <div class="col m4 s6 sample">     <img src="http://lorempixel.com/580/250/nature/1" class = "responsive-img">     <p>short text</p>   </div>   <div class="col m4 s6 sample">     <img src="http://lorempixel.com/580/250/nature/1" class = "responsive-img">   </div>    <div class="col m4 s6 sample">     <img src="http://lorempixel.com/580/250/nature/1" class = "responsive-img">   </div>   <div class="col m4 s6 sample">     <img src="http://lorempixel.com/580/250/nature/1" class = "responsive-img">   </div> </div> 

javascript

$(document.ready(function(){    $('.sample').matchheight(); }); 

Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -