.cards { display: grid; grid-template-columns: repeat(2, 1fr); } .featured { grid-column: 1 / span 2; }The featured card occupies the width of both columns.
LESSON 66 OF 100
Make a featured card occupy both grid columns.
grid-column is shorthand for an item’s start and end lines. 1 / span 2 starts at line one and spans two column tracks.
.cards { display: grid; grid-template-columns: repeat(2, 1fr); } .featured { grid-column: 1 / span 2; }The featured card occupies the width of both columns.
.featured { grid-column: 1; }One line sets only the start and does not request spanning two tracks.
Create two columns and span .featured with 1 / span 2.
The container defines two tracks, and grid-column on the child sets its span without moving the HTML.
ANALYSIS REQUEST
The initial discussion is without obligation. You receive an honest recommendation, suitable stages and the factors that affect price.