html - Materialize alignment issue with cards -


hey guys i'm using materialize framework , added normal image cards this.

screenshot

  <div class="row">   <div class="col s12 m6 l3">         <div class="card">             <div class="card-image">                 <img src="img/websiteicon.png" alt="websites">                 <span class="card-title">title here</span>             </div>             <div class="card-content">                 <p>text here</p>             </div>             <div class="card-action">                 <a href="diensten.php">check out possibilities</a>             </div>         </div>     </div>  (4 div cards)  </div> 

this appears @ medium browser size , @ widths.

does know how fix this? pretty sure it's not bug.

this because cards have different heights, causes cards appear on wrong "row". reason appears on widths because of content reflowing, causing parent element expand in height.

there couple of ways can solve this. can make use of materializes card size. sets card static height, if need display lot of content not recommend it.

<div class="card medium">  ...     </div> 

another way solve adding level of rows, grouping (as example) 2 cards. if use correct size on columns (2 cards .m6, 3 .m4, 4 cards .m3 , on) not cause content of row wrap second row.

<div class="row">  <div class="row col s12 m12 l6"> <!--1st row containing 2 cards-->   <div class="col s12 m6 card">    ...   </div>   <div class="col s12 m6 card">    ...   </div>  </div><!--end row-->   <div class="row col s12 m12 l6">  <!--2nd row containing 2 cards-->   <div class="col s12 m6 card">    ...   </div>   <div class="col s12 m6 card">    ...   </div>  </div><!--end row--> </div 

live example: http://codepen.io/dehrax/pen/lkqbwz


Comments

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -