I have a list of items that gets displayed in grid format. Couldn't find repeat css function compatible for IE 11.
It works in other browsers. But not in IE. In IE only 1 item gets created.
Please check this post or jsfiddle link in IE and (chrome, firefox) for output.
Below is the code.
body {
margin: 30px;
}
/*autoprefixer will add the prefixed properties for grid and columns/rows
we need to create tracks for gaps for IE*/
.wrapper {
display: -ms-grid;
display: grid;
grid-gap: 10px;
grid-auto-rows: 150px;
-ms-grid-columns: 1fr 1fr 1fr 1fr;
-ms-grid-rows: 160px 160px 160px 160px;
grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
background-color: #fff;
color: #444;
}
.box {
background-color: #444;
color: yellow;
border-radius: 5px;
font-size: 150%;
text-align: center;
}
<div class="wrapper">
<div class="box">A</div>
<div class="box">B</div>
<div class="box">C</div>
<div class="box">D</div>
<div class="box">E</div>
</div>
I checked with other stackoverflow posts but none of them worked.