Faire de l'alignement via display grid

2 options :

justify => X axe horizontal
align => Y axe vertical
justify-items | align-items

justify-content | align-content

justify-self | align-self



justify-item - align-item

La grille fait (ou pas) toute la largeur / hauteur du parent :

justify-items: stretch* | center | start | flex-start | end | flex-end ;
align-items: stretch* | center | start | flex-start | end | flex-end ;

default

1
2
3
4
5
6

justify-items: center;

1
2
3
4
5
6

justify-items: center;
align-items:center;

1
2
3
4
5
6



justify-content - align-content

la grille ne fait pas toute la largeur / hauteur du parent :

justify-content: stretch | center | start* | flex-start | end | flex-end | space-between | space-round;
align-content: stretch | center | start* | flex-start | end | flex-end | space-between | space-round;

default

1
2
3
4
5
6

justify-content: center;
align-content: flex-end;

1
2
3
4
5
6

justify-content: space-between;
align-content: center;

1
2
3
4
5
6



justify-self - align-self

la grille ne fait (ou pas) toute la largeur / hauteur du parent :

justify-self: stretch* | center | start | flex-start | end | flex-end ;
align-self: stretch* | center | start | flex-start | end | flex-end | baseline;

default

1
2
3
4
5
6

modification par cellule

1
2
3
4
5
6
7
8
9
10
11
12
13