CSS | grid-column-start Property
The grid-column-start property defines on which column line item will start. There are different values for the grid-column-start property, with the different value user can start from anywhere. There is a specific value that is effected on the same naming block as well.
Syntax:
grid-column-start: auto|span n|column-line;
Property Values:
-
auto: A keyword specifying that the property contributes nothing to the grid item’s placement. The Default value, the item will be placed following the flow
Syntax:
grid-column-start: auto;
Example:
<!DOCTYPE html><html><head><title>CSS | grid-column-start Property</title><style>.grid-container {display: grid;grid-template-columns: auto auto auto auto;grid-gap: 10px;background-color: lightgreen;padding: 10px;}.grid-container div {background-color: green;text-align: center;padding: 20px 0;font-size: 30px;color: white;}.item1 {<!-- grid-column-start propertywith auto value -->grid-column-start: auto;}</style></head><body><center><h1>The grid-column-start Property</h1><h3>auto value</h3><strong>the item will be placedfollowing the initial flow</strong></center><divclass="grid-container"><divclass="item1">G</div><divclass="item2">e</div><divclass="item2">e</div><divclass="item3">k</div><divclass="item4">s</div><divclass="item5">f</div><divclass="item6">o</div><divclass="item6">r</div><divclass="item1">G</div><divclass="item2">e</div><divclass="item2">e</div><divclass="item3">k</div><divclass="item4">s</div></div></body></html>chevron_rightfilter_noneOuptut:

-
span n: A keyword Specifies the number of columns the item will span and if the name is given as a, only lines with that name are counted
Syntax:
grid-column-start: span n;
Example:
<!DOCTYPE html><html><head><title>CSS | grid-column-start Property</title><style>.grid-container {display: grid;grid-template-columns: auto auto auto auto;grid-gap: 10px;background-color: lightgreen;padding: 10px;}.grid-container div {background-color: green;text-align: center;padding: 20px 0;font-size: 30px;color: white;}.item1 {<!-- grid-column-start propertywith span value -->grid-column-start: span 4;}</style></head><body><center><h1>The grid-column-start Property</h1><h3>auto value</h3><strong>the item will be placed followingthe initial flow</strong></center><divclass="grid-container"><divclass="item1">G</div><divclass="item2">e</div><divclass="item2">e</div><divclass="item3">k</div><divclass="item4">s</div><divclass="item5">f</div><divclass="item6">o</div><divclass="item6">r</div><divclass="item1">G</div><divclass="item2">e</div><divclass="item2">e</div><divclass="item3">k</div><divclass="item4">s</div></div></body></html>chevron_rightfilter_noneOuptut:

-
column-line: A keyword Specifies on which column to start the display of the item, user can set the starting column.
Syntax:
grid-column-start: column-line;
Example:
<!DOCTYPE html><html><head><title>CSS | grid-column-start Property</title><style>.grid-container {display: grid;grid-template-columns: auto auto auto auto;grid-gap: 10px;background-color: lightgreen;padding: 10px;}.grid-container div {background-color: green;text-align: center;padding: 20px 0;font-size: 30px;color: white;}.item1 {<!-- grid-column-start propertywith column-line value --!>grid-column-start: 2;}</style></head><body><center><h1>The grid-column-start Property</h1><h3>auto value</h3><strong>the item will be placed followingthe initial flow</strong></center><divclass="grid-container"><divclass="item1">G</div><divclass="item2">e</div><divclass="item2">e</div><divclass="item3">k</div><divclass="item4">s</div><divclass="item5">f</div><divclass="item6">o</div><divclass="item6">r</div><divclass="item1">G</div><divclass="item2">e</div><divclass="item2">e</div><divclass="item3">k</div><divclass="item4">s</div></div></body></html>chevron_rightfilter_noneOuptut:

Supported Browser: The browser supported by grid-column-start Property are listed below:
- Google Chrome 57.0
- Internet Explorer 16.0
- Mozila Firefox 52.0
- Safari 10.0
- Opera 44.0
Recommended Posts:
- CSS | transition-property Property
- CSS | nav-down property
- CSS | all Property
- CSS | nav-right property
- CSS | right Property
- CSS | top Property
- Web API | DOMRectReadOnly x property
- Web API | DOMRectReadOnly y property
- CSS | left Property
- CSS | perspective Property
- CSS | padding-right Property
- Web API | DOMRect right property
- CSS | resize Property
- CSS | align-self Property
- CSS | grid-row Property
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



