<div class="grid">
<div>Alfa</div>
<div>Bravo</div>
<div>Charlie</div>
<div>If we add more content to any grid item then the entire row will grow to give it space.</div>
<div>Echo</div>
<div>Foxtrot</div>
</div>
* { box-sizing: border-box; }
html {
font: 1.2em Helvetica, sans-serif;
}
body {
padding: 40px;
background-color: #fff;
color: rgb(108,91,123);
}
.grid {
display: grid;
grid-gap: 10px;
grid-template-columns: 200px 200px 200px;
}
.grid > * {
border: 5px solid rgb(108,91,123);
border-radius: 5px;
padding: 10px;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.