Is there another syntax we can use to overlap elements within CSS grid?


#1

Question

Is there another syntax we can use to overlap elements within CSS grid?

Answer

Yes there is! grid-area is a shorthand for the grid-row and grid-column properties you learned about in the last lesson. Hence, instead of applying the grid-area: 6 / 4 / span 2 / span 2; declaration to our .overlap class in step 3 of this exercise, we could apply these two declaration: grid-row: 6 /span 2 ;, grid-column: 4 /span 2; to the class.