S
S
sorry_i_noob2019-08-14 20:46:01
Flexbox
sorry_i_noob, 2019-08-14 20:46:01

Why doesn't "align-self: flex-end;" work?

Hello!
There is such code:
https://jsfiddle.net/ec5Ldazv/
Please explain why this part does not work for the first ".wrap":

.item:nth-of-type(3) {
  align-self: flex-end;
}

But if you comment out this:
.wrap {
  align-content: flex-start;
}

Then everything starts working normally. But I need all other elements to be on top.
Why does not it work? Logically everything should work.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roma Zvarich, 2019-08-14
@sorry_i_noob

Please explain why this part does not work for the first ".wrap"

Because parent is set align-content: flex-start;to , which overrides To work, set align-self
parent instead to Result: https://codepen.io/hisbvdis/pen/qBWZOmqalign-content: flex-start;align-items: flex-start;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question