Solution 1 :

Add this changes:

.abc{
  height: auto;
}
.one{
  grid-row: 1/5;
  display: flex;
  align-items: flex-end;
}

Solution 2 :

I guess this is what you are looking for. as far as my understanding the requirements are for the container to start from the end of the todo container and grow upwards, this css fulfills the requirements

.abc{
  display:grid;
height:auto;
    grid-template-columns: repeat(12,6.697%);
    grid-template-rows: 18px repeat(4, 1fr);
   border:1px solid green;
  /* height:320px */
}
.one{
  grid-column: 2/5;

  grid-row-start: 4;
  grid-auto-flow: row;
    border:1px solid;
  display: flex;
  height: fit-content;
  background-color:red;
  justify-content: center;

}
.two {
  grid-row: 1/5;
    border:1px solid #ee0;
}

Problem :

I have div which have some text content. I want to make that div align to bottom . or in other words it bottom never change when text grow .

here is my code

https://codepen.io/naveen-1234/pen/ExXNRbZ

when I have small text it looks good
enter image description here

but when my text increase it overflow the container like this

enter image description here

but the expected output is it should grow in upward direction

Expected output

enter image description here

is there any way in css grid using minmaxval or auto-fit or auto fill to grow div in upward direction .?

.abc{
  display:grid;
    grid-template-columns: repeat(12,6.697%);
    grid-template-rows: 18px repeat(4, 1fr);
   border:1px solid green;
  height:320px
}
.one{
  grid-column: 2/5;
   grid-row: 3/5;
    border:1px solid;
}
.two {
  grid-row: 1/5;
    border:1px solid #ee0;
}


<div class="abc">
  
  <div class="one">
    <p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Voluptates culpa iste facaudantium Lorem ipsum, dolor sit amet consectetur adipisicing elit. Voluptates culpa iste facaudantium
    Lorem ipsum, dolor sit amet consectetur adipisicing elit. Voluptates culpa iste facaudantium
    Lorem ipsum, dolor sit amet consectetur adipisicing elit. Voluptates culpa iste facaudantium</p>
  </div>
  <div class="two">
    tooo
  </div>
</div>

Comments

Comment posted by Sachin Ananthakumar

can you check my solution?

Comment posted by Gert B.

@SachinAnanthakumar there is no need to ask to check your solution. If you answer the user will get a notification.

Comment posted by Sachin Ananthakumar

@GertB. got it!!

Comment posted by user5711656

not a correct solution share codepen link

Comment posted by codepen.io/Zerhogi/pen/dyROjbj

@user5711656

Comment posted by user5711656

thanks for answer. but why you change

Comment posted by Zerhogi

i changed it because in your expected behavior black bordered box height = yellow box height

Comment posted by Sachin Ananthakumar

@user5711656 check my solution

Comment posted by Zerhogi

this solution is good, but without height it will make container “abc” growing to fast depends on text content, and with height it will overflow

By