-3

I'm trying to move the element to the bottom of its parent but only way to do that is to make it positioned absolute but i want it to be relative.

#output{
  height: 100px;
  background-color: red;
}

#inner{
  height: 30px;
  background-color: blue;
  /*float: down*/
}
<div id="output">
  <div id="inner"></div>
</div>
Kim Ber
  • 69
  • 11

1 Answers1

0

#output{
  height: 100px;
  background-color: red;
  display: flex;
  flex-direction: column;
  
}

#inner{
   margin-top: auto;
   height: 30px;
   background-color: blue;
   /*float: down*/
}
<div id="output">
  <div id="inner"></div>
</div>
Will
  • 389
  • 1
  • 11