CSS Grid Item | html gridview w3schools
TryitYourself»[1]ChildElements(Items)Agridcontainercontainsgriditems.Bydefault,acontainerhasonegriditemforeachcolumn,ineachrow,butyoucanstylethegriditemssothattheywillspanmultiplecolumnsand/orrows.Thegrid-columnProperty:Thegrid-columnpropertydefinesonwhichcolumn(s)toplaceanitem.Youdefinewheretheitemwillstart,andwheretheitemwillend.Note:Thegrid-columnpropertyisashorthandpropertyforthegrid-column-startandthegrid-column-endproperties.Toplaceanitem,youcanrefertolinenumbers,orusethekeyword"span"t...
Try it Yourself »[1]
Child Elements (Items)A grid container contains grid items.
By default, a container has one grid item for each column, in each row, but you can style the grid items so that they will span multiple columns and/or rows.
The grid-column Property:The grid-column property defines on which column(s) to place an item.
You define where the item will start, and where the item will end.
Note: The grid-column property is a shorthand property for the grid-column-start and the grid-column-end properties.
To place an item, you can refer to line numbers, or use the keyword "span" to define how many columns the item will span.
ExampleMake "item1" start on column 1 and end before column 5:
.item1 { grid-column: 1 / 5;}
Try it Yourself »[2]
ExampleMake "item1" start on column 1 and span 3 columns:
.item1 { grid-column: 1 / span 3;}
Try it Yoursel...