I have three elements, first two elements are columns while the last is a row. Tried a couple of different things but I`m not able to get the result I desire
.container {
display: flex;
flex-direction: column;
}
.element {
display: flex;
}
.icon {
display: flex margin-left: auto;
align-content: center;
}
<div className="container">
<div className="element">Name Detail</div>
<div className="element">Salary Detail</div>
<div className="icon">(Here is a svg)</div>
</div>
4
Answers
You should put your .elements in their own container.
Html
Css
By looking at your desired result, one way to do it would be something like this.
Where your
container
is actuallyflex-direction: row
and the classelementWrapper
would beflex-direction: column
:The following code should help:
Hope it helps!
with last element dynamic spacing and text centering