I have come across a little problem in creating my website, which is that when some text is longer than others the divs are not aligned correctly, which you can see with the red straight line in the picture. I was wondering if there is some way to align these divs along the red line?
.FlexAndCenter {
display: flex;
justify-content: center;
}
.Padding1REM {
align-self: center;
justify-self: center;
min-width: 100px;
max-height: 100px;
max-width: 500px;
padding: 1rem;
}
.ROWFLEX {
flex-direction: column;
display: flex;
word-wrap: break-word;
}
.BILD {
align-self: center;
justify-self: center;
padding-right: 1rem;
}
<div class="FlexAndCenter Padding1REM">
<div class="BILD">
<img src="https://via.placeholder.com/80" />
</div>
<div class="ROWFLEX">
<p>namn på vara: {vara} </p>
<p>pris på vara: {pris}</p>
<p>datum köpt: {datum}</p>
<p>swishnummer: {swish}</p>
</div>
</div>
<div class="FlexAndCenter Padding1REM">
<div class="BILD">
<img src="https://via.placeholder.com/80" />
</div>
<div class="ROWFLEX">
<p>namn på vara: {vara} </p>
<p>pris på vara: {pris}</p>
<p>datum köpt: {datum}</p>
<p>swishnummer: {swish} more words more words</p>
</div>
</div>