materialize icon indicating copy to clipboard operation
materialize copied to clipboard

Cards layout

Open mishanthrop opened this issue 10 years ago • 6 comments

It is ok?

<div class="col s12 m4">
    <div class="card">
      <div class="card-image">
        <img src="images/sample-1.jpg">
        <span class="card-title">Название карточки</span>
      </div>
      <div class="card-content">
        <p>I am a very simple card. I am good at containing small bits of information. I am convenient because I require little markup to use effectively.</p>
      </div>
      <div class="card-action">
        <a href="#">Ссылка здесь</a>
      </div>
    </div>
</div>

Cards

mishanthrop avatar Jan 18 '16 22:01 mishanthrop

This is quite a common issue with grid elements that have varying heights based on their content.

I had a similar when developing gemsavvy.tips using Materialize - for last year's Rails Rumble.

You could either set an appropriate height value across media queries for your cards - so the columns line up correctly, or consider implementing something like masonry.js if your content is really varied.

lovekaizen avatar Jan 21 '16 16:01 lovekaizen

Been too many times with this behaviour, and always using a "masonry" solution with column-count at container.

Is there any other solution with different heights?

CesarGonzalezM avatar Jan 22 '16 12:01 CesarGonzalezM

There's an excellent jquery plugin for this called matchheight.js that even works with rows. Try it out.

cfreear avatar Jan 22 '16 16:01 cfreear

@lovekaizen, @CesarGonzalezM suitable plugin (masonry), I choose it, thanks.

mishanthrop avatar Jan 23 '16 00:01 mishanthrop

As this is not a bug, I am going to close this issue, but feel free to discuss.

Dogfalo avatar Jan 23 '16 04:01 Dogfalo

Facing the same problem you can try place each card elements in a separate row class. kinda shocked materialize hasnt solved this issue

legion40216 avatar Feb 11 '22 20:02 legion40216