I'm facing an issue with my flexbox layout. I have set it up to display two elements per row, and there is enough width for this arrangement. However, each element is taking up one whole row instead of appearing side by side as intended. Below is the code I am using:
gallery.html:
<div class="container" *ngFor="let imageOrFile of imagesAndFiles">
<div class="image">
<dispo-einsatz-dokumente-gallery-image-item
[image]="imageOrFile"
></dispo-einsatz-dokumente-gallery-image-item>
</div>
</div>
gallery.scss:
.container {
display: flex;
flex-direction: row;
}
.image {
width: 40%;
height: 200px;
}
Within the child component html:
<p>{{ image.name }}</p>
This is the current result:
https://i.sstatic.net/SQKKn.png
Can anyone help me understand why this is happening, and how can I adjust the layout to have both elements in one row?