Trying to setup a css grid layout for my app navigation bar, but I am having trouble getting the justify-content property to work. Here I am trying to set it to center, but what I really want is a layout where the gutter space expands according to the space available.
Fiddle of the problem: https://jsfiddle.net/epch33vx/
My html:
<div class='test'>
<div class='item'>
1
</div>
<div class='item'>
2
</div>
<div class='item'>
3
</div>
<div class='item'>
4
</div>
</div>
My stylesheet:
.test {
display: grid;
grid-template-columns: repeat(4, minmax(56px, 80px));
position: fixed;
bottom: 0;
left: 0;
width: 100%;
box-shadow: 0 0 2px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.24);
justify-items: center;
}
.item {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
min-height: 56px;
font-size: 14px;
text-decoration: none;
}