In this tutorial, I'll be going over all the steps the autoplacement algorithm of the CSS Grid Layout module follows when positioning elements. These steps are controlled by the
In Seven Ways You Can Place Elements Using CSS Grid Layout, I explained all the different ways Grid lets you arrange elements on the web. However, in my previous articles I explicitly specified the position of just one element in the grid. As for the rest of the items, they got placed properly based on an algorithm.
Here, I am going to show you how this algorithm works. This way, the next time an element ends up in an unexpected location, you are not left ...