I have a layout for the form, see attached code snippet. You can notice that output result is different from "layout" in grid-template-areas. For example, on the second row email and address1 should be split in the middle, in fact they are divided on 1/3 mark or so.
I also noticed that visual bug in the gaps, but I don't see anything wrong in the html part.
I'll welcome any ideas on what caused such issues in my grid.
.grid {
margin: 20px;
width: 200px;
display: grid;
grid-template-areas: 'firstName firstName firstName lastName lastName lastName shares shares'
'email email email email address1 address1 address1 address1'
'phone phone phone phone city city state zip';
gap: 2px;
}
.f {
grid-area: firstName;
}
.l {
grid-area: lastName;
}
.s {
grid-area: shares;
}
.e {
grid-area: email;
}
.a {
grid-area: address1;
}
.p {
grid-area: phone;
}
.c {
grid-area: city;
}
.st {
grid-area: state;
}
.z {
grid-area: zip;
}
<div class="grid">
<input type="text" class="f">
<input type="text" class="l">
<input type="text" class="s">
<input type="text" class="e">
<input type="text" class="a">
<input type="text" class="p">
<input type="text" class="c">
<input type="text" class="st">
<input type="text" class="z">
</div>

input {margin:1px;}instead and mismatch from columns won't show.grid-template-columns, instead ofgrid-template-areas? It could help you to redefine your grid. See here: developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout