I am trying to center one item with flexbox, the one in blue. And the item in red should not be centered but simply be aligned to the right of the blue item. How to do this?
.container {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
.box.right-item {
background: red;
width: 200px;
}
.box.left {
background: blue;
width: 200px;
height: 20px;
}
<div class="container">
<div class="box left">
xx
</div>
<div class="box right-item">
yy
</div>
</div>