I have the code below and the following issues:
I need that all the children of
.lt
to get the biggest height.(see red border on firs.lt
}. for that I usealign-items: stretch
;I need the content of the element
.left
to be v/h center. So I usealign-self:center;
but this cancel the stretch. (the red border is reduced)I need the
.right
elements to be aligned left and top.
.container {
display: flex;
flex-direction:column;
}
.lt{
align-items: stretch;
border: 1px solid #e3e3e3;
display: flex;
margin-bottom: 1.5rem;
}
.left {
border-right: 1px solid red;
flex: 0 0 90px;
padding: 8px;
align-self:center;
justify-content: center;
}
.right {
justify-self: flex-start;
}
<div class="container">
<div class="lt">
<div class="left">
<a href="">
<img src="https://via.placeholder.com/75"/>
abcd
</a>
</div>
<div class="right">
dable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).
the years, sometimes by accident, sometimes on purpose (injected humour and the like).
</div>
</div>
<div class="lt">
<div class="left">
<a href="">
<img src="https://via.placeholder.com/75"/>
abcd
</a>
</div>
<div class="right">
dable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default mode
</div>
</div>
</div>