I am trying to wrap my head around css grids, but in this code the grid template areas are not functioning as i would expect them to. I need my WinLoseDisplay to span 2 columns, but it just takes up one column and instead of having my page grid look like this:
" b d d"
" b b b"
" b b b"
It looks like this
" b d b"
" b b b"
" b b "
Any help would be much appreciated
.MainContainer {
display: grid;
grid-template-columns: 200px 200px 200px;
grid-gap: 20px;
grid-template-areas: "b d d" "b b b" "b b b"
}
.ButtonRock {
grid-template: "b";
}
.WinLoseDisplay {
grid-template: "d";
}
.ButtonPaper {
grid-template: "b";
}
.PlayerSelection {
grid-template: "b";
}
.PcSelection {
grid-template: "b";
}
.ButtonScissors {
grid-template: "b";
}
.ButtonPlay {
grid-template: "b";
}
.Placeholder {
grid-template: "b";
}
<div class='MainContainer'>
<div class='ButtonRock a'>
<button id='Rock'>Rock</button>
</div>
<div class='WinLoseDisplay'>
winlosedisplay
</div>
<div class='ButtonPaper a'>
<button id='Paper'>Paper</button>
</div>
<div class='PlayerSelection a'>
player selection
</div>
<div class='PcSelection a'>
pc selection
</div>
<div class='ButtonScissors a'>
<button id='Scissors'>Scissors</button>
</div>
<div class='ButtonPlay a'>
<button id='Play'>Play</button>
</div>
<div class='Placeholder a'>
placeholder
</div>
</div>