How to place one element on top of another using CSS Grid rather than resorting to position absolute

Опубликовано: 22 Октябрь 2024
на канале: A shot of code
17,087
214

In this video we look at how to overlap elements using CSS Grid rather than position absolute. This has the advantage of leaving the elements in the normal HTML flow and makes reasoning about the rest of the page layout easier. It gives us the advantages that CSS Grid provides for the centering of elements and general positioning over using absolute positioning also.

Once you try it you'll never go back!