align-self & z-index


A
align-self: start;
B
z-index: 10;
C
align-self: start;
margin-left: -50px;
D
justify-self: end;
align-self: start;

E
z-index: 5;
justify-self: center;
align-self: center;
box {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  width: 600px;
  height: 510px;
  padding: 15px;
  border-width: 1px;
}

  #A  {                                         #B  {
  grid-column: 1 / span 2;         grid-column: 1;
  grid-row: 2;                             grid-row: 1;
  align-self: end;                        z-index: 10;
  height: 150px;                          height: 180px;
}                                               }

  #C  {                                        #D  {
  grid-column: 2;                       grid-column: 2;
  grid-row: 1;                             grid-row: 2;
  align-self: start;                      justify-self: end;
  margin-left: -50px;                 align-self: start;
  height: 130px;                         height: 120px;
}                                                padding-left: 40px;
                                                  padding-right: 40px;
                                                }  
  #E  {
  grid-column: 1 / span 2;
  grid-row: 1 / span 2;
  z-index: 5;
  justify-self: center;
  align-self: center;
  height: 168px;
  padding-left: 50px;
  padding-right: 50px;
}

width: 600px;  height: 510px;

padding: 15px

border: 1px

Actual box   width: 632px;  height: 542px;


Grid gap

column-gap: 60px; [ row-gap / column-gap ]

width: 580px

content width: 260px

vsible gap 60px

vsible gap 100px

vsible gap 140px

margin 20px

margin 20px

padding 20px

content width: 220px

content width: 180px


Position absolute & relative

1
2
3
4
grid: 1 / 2 / span 2 / auto;
position: absolute;
top: 70px; bottom: 40px; left: 80px; right: 80px;
5
6
7
8
9
10
11
12
13
14
15
grid: 3 / 1 / span 1 / span 3;
position: relative;
top: 70px; right: 80px;

containing block

80px

80px

70px

40px

80px

70px