I need some of my elements to overlap, I also want to specify things by area name rather than row/column because it makes for a nicer read.
I cannot for the life of me understand how specifying multiple grid areas works as per MDN examples. Or if its even possible, the article suggests its possible as per syntax examples but how does it actually work?? Not a clue.
Example problem:
document.querySelector("input").focus();
#my_grid {
display:grid;
grid-gap:5px;
grid-template-rows: 50px 50px 50px;
grid-template-columns: 50px 50px 50px;
grid-template-areas: "a b c"
"d e f"
"g h i";
}
#my_grid > div {
text-align:center;
line-height:50px;
border:1px solid rgba(0,0,0,0.3);
background-color:rgba(0,0,0,0.1);
}
<div id="my_grid">
<div style="grid-area:a">a</div>
<div style="grid-area:b">b</div>
<div style="grid-area:c">c</div>
<div style="grid-area:d">d</div>
<div style="grid-area:e">e</div>
<div style="grid-area:f">f</div>
<div style="grid-area:g">g</div>
<div style="grid-area:h">h</div>
<div style="grid-area:i">i</div>
<input type="text" onKeyUp="this.style.gridArea = this.value" style="grid-area:d / e" value="d / e">
</div>
Type your own area
I want my input to cover both areas d and e, specifying d / e just puts it in e.