justify-self
is not working. Why?
html
<div class="container">
<div class="a">
</div>
<div class="b">
</div>
<div class="b">
</div>
</div>
css
.container {
display: flex;
justify-content: center;
background: yellow;
}
.container * {
width: 10px;
height: 10px;
background: green;
border: 2px solid red;
}
.a {
justify-self: start;
}
I would expect the first element to be aligned to left since it has class a
and class a
specifies justify-self: start
, but that does not happen. Why?
As I was informed in comments flexbox does not support the justify-self
property. Then how could I position two of children in middle of the parent and one child stick to the left side of the parent using for example grid?