CSS grid-column-end Property

CSS grid-column-end Property

This property specifies how many columns a element will span,or in other words, This property specifies the end column on which an item will end spanning.
Syntax -

grid-column-end: auto|span n|column-line;

Now we will see the values with their description -




The item will span one column only, and this is the default value.

span n

This specifies the no. of columns the item will span


This specifies on which column to end spanning

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-end: span 2;
  grid-column-end: span 3;

  grid-column-end: span 3;


    <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 -