CSS grid-column Property

CSS grid-column Property

You can override the default grid positioning and specify specific grid row and column indices for grid items using the grid-column.

A grid item can be made to span multiple columns by using the grid-column-start, and grid-column-end.

grid-column properties can also be used as a shorthand for these properties.

Syntax -

grid-column: grid-column-start / grid-column-end;

Now we will see the example -

Example -

    <title>Title of the document</title>

    .Here  {
  display: grid;
  grid-template-columns: auto auto auto;
  grid-template-rows: auto auto;
  grid-gap: 10px;
  background-color: #2196F3;
  padding: 10px;
  grid-auto-flow: row;
border: 4px solid rgb(99, 45, 135);
border-radius: 50px;
background-color: rgb(234, 199, 59);

  grid-column: 1 / span 2;
  grid-column: 2 / span 2;

  grid-column: 1 / span 2;


    <div class="Here">
      <div class="one">one</div>
      <div class="two">two</div>
      <div class="three">three</div> 
      <div class="four">four</div>
      <div class="five">five</div>
      <div class="six">six</div>
      <div class="seven">seven</div> 
      <div class="eight">eight</div> 
      <div class="nine">nine</div> 


Output  -