I'm having some trouble with a flexbox layout. What I'm trying to achieve is how the image below is positioned. However, using margin and padding I can move the elements to the correct place without something drastic happening.
I am probably approaching this incorrectly. If someone could give me some advice and an explanation on how to do this correctly that would be great.
Wireframe
How it is right now
HTML
<div style="background: grey;">
<div class="parent-container" style="flex-direction: column; align-items: center; margin: 10px;">
<div class="aelia-text child33">
The first of it's kind, to<br/>
create a better customer<br/>
journey with reduced<br/>
collection waiting time and<br/>
a special moment that makes<br/>
even the most jet-lagged<br/>
shopper smile.
</div>
<div class="child33">
<div class="img-wrapper" ng-style="{'background-image':'url(/assets/Aelia_Robot_highres006.jpg)'}"></div>
</div>
<div class="child33">
<div class="img-wrapper" ng-style="{'background-image':'url(/assets/AELIA_IMAGE.jpg)'}"></div>
</div>
</div>
</div>
CSS
.aelia-text {
background: white;
color: black;
font-size: 1.5vw;
font-family: portland-medium-font;
-ms-flex-pack: center;
justify-content: center;
-ms-flex-align: center;
align-items: center;
display: -ms-flexbox;
display: flex;
}
.child33 {
position: relative;
-ms-flex-positive: 1;
flex-grow: 1;
height: 50%;
width: 33.3%;
max-width: calc(100% * (1/3));
margin: 0;
position: relative;
-ms-flex-flow: nowrap row;
-o-flex-flow: nowrap row;
flex-flow: nowrap row;
border: 0;
outline: 0;
}
.parent-container {
display: -ms-flexbox;
display: flex;
font-size: 0;
margin: 0;
padding: 0;
border: 0;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
height: 92vh;
width: 100vw;
}
.img-wrapper {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-size: cover;
}