I have a div
with display: flex
and two children div say .left
and .right
.
The content size of the .left
and .right
are different. I want to set same height for the children
here is a minimal working code
.container{
display: flex;
align-items: center
}
.left, .right{
width: 50%;
}
.right{
background: blue;
height: 100%;
}
.left{
background: green;
height: 100%;
}
<div class="container">
<div class="left">
<span>this dis also should have same width as right div</span>
</div>
<div class="right">
orem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</div>
</div>
Here is the Fiddle for the question
Note: Prefer a solution without applying position: absolute
as it will destroy my actual website