--- id: 5a90372638fddaf9a66b5d38 title: Use grid-column to Control Spacing challengeType: 0 videoUrl: 'https://scrimba.com/p/pByETK/cnzkDSr' forumTopicId: 301136 dashedName: use-grid-column-to-control-spacing --- # --description-- Up to this point, all the properties that have been discussed are for grid containers. The `grid-column` property is the first one for use on the grid items themselves. The hypothetical horizontal and vertical lines that create the grid are referred to as lines. These lines are numbered starting with 1 at the top left corner of the grid and move right for columns and down for rows, counting upward. This is what the lines look like for a 3x3 grid:

column lines

1

2

3

4

row lines

1

2

3

4

To control the amount of columns an item will consume, you can use the `grid-column` property in conjunction with the line numbers you want the item to start and stop at. Here's an example: ```css grid-column: 1 / 3; ``` This will make the item start at the first vertical line of the grid on the left and span to the 3rd line of the grid, consuming two columns. # --instructions-- Make the item with the class `item5` consume the last two columns of the grid. # --hints-- `item5` class should have a `grid-column` property. ```js assert( __helpers .removeWhiteSpace($('style').text()) .match(/\.item5{.*grid-column:.*}/g) ); ``` `item5` class should have a `grid-column` property which results in it consuming the last two columns of the grid. ```js const colStart = getComputedStyle($('.item5')[0]).gridColumnStart; const colEnd = getComputedStyle($('.item5')[0]).gridColumnEnd; const result = colStart.toString() + colEnd.toString(); const correctResults = [ '24', '2-1', '2span 2', '2span2', 'span 2-1', '-12', 'span 2span 2', 'span 2auto', 'autospan 2' ]; assert(correctResults.includes(result)); ``` # --seed-- ## --seed-contents-- ```html
1
2
3
4
5
``` # --solutions-- ```html
1
2
3
4
5
```