@Alex-Archer-I
Posted
Hi!
Well done, congrats with new challenge and new technique =)
But you haven't reached full potential of grid yet! You can directly tell elements inside grid which cells they should take.
For example, you have 4x2 grid. It is formed by lines.
1 2 3 4 5
1 | - - - | - - - | - - - | - - - |
| | | | |
2 | - - - | - - - | - - - | - - - |
| | | | |
3 | - - - | - - - | - - - | - - - |
Not a best drawing, but something like that... Now you need to pace one of the elements inside your grid exactly in the first two cells.
.card {
grid-column-start: 1;
grid-column-end: 3;
grid-row-start: 1;
grid-row-end: 2;
}
Or shorter version
.card {
grid-column: 1 / 3;
grid-row: 1/ 2;
}
Notice that you should define the lines in which it'll be placed. This element will take exactly two first cells of the grid. So now you doesn't have to hardcode it's width or use positioning.
So, that it is. Hope that helps =)
@Macnelson9
Posted
@Alex-Archer-I Got it man. I'll keep practicing. Thank you so much