Grid by Example

Everything you need to learn CSS Grid Layout

Line-based placement

Using the Grid I defined in example 1, I am positioning the elements in my markup (six divs with a class of box and classes from a to f) using line-based placement properties. This example is more verbose than it needs to be as a demonstration of the properties. In reality if an item will only span one grid track you may omit the -end value.

Read the specification | View example as full page

See the Pen Grid by Example 2: Line-based placement by rachelandrew (@rachelandrew) on CodePen.