Grid by Example

Everything you need to learn CSS Grid Layout

Line-based placement named lines with spans

You can give lines the same name and then use the span keyword to target lines of a certain name. This is really useful if you want to create a complex grid with multiple content tracks and gutters.

I have made a slightly larger grid here and have named all of the Grid Lines before the content tracks with col and all of the lines before the row tracks with row. I can then start at a certain column line by using col <line number> and span by saying span <number of lines>.

Read the specification | View example as full page

See the Pen Grid by Example 8: Line-based placement named lines with span by rachelandrew (@rachelandrew) on CodePen.