So I have got a materialize collection with some customisation.
<ul class="collection">
<li class="collection-item avatar valign-wrapper" style="min-height: 64px">
<i class="material-icons circle">build</i>
<span class="title">A</span>
</li>
<li class="collection-item avatar valign-wrapper" style="min-height: 64px">
<i class="material-icons circle">comment</i>
<span class="title">B</span>
</li>
<li class="collection-item avatar valign-wrapper" style="min-height: 64px">
<i class="material-icons circle">description</i>
<span class="title">C</span>
</li>
<li class="collection-item avatar valign-wrapper" style="min-height: 64px">
<i class="material-icons circle">content_copy</i>
<span class="title">D</span>
</li>
I use the valign-wrapper
to vertically align the span
and the i
. And the valign-wrapper
use flex
.
These code does not work in IE.
My current workaaruond is to add
li span{
height: 40px; /* image's height */
display: table-cell;
vertical-align: middle;
}
Is there a better way to make it cross-browser workable? Ideal pertain valign-wrapper
and do not add too many intrusive code.