Z
Z
Zuckerberg2019-09-05 11:51:44
Flexbox
Zuckerberg, 2019-09-05 11:51:44

Multiple items on top, one on bottom on flexbox?

Is it possible to do this purely on flexbox, without additional manipulations:
5d70cc2617ce0365669775.jpeg
Preparation: https://jsfiddle.net/120Lcg7m/

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
BigSmoke, 2019-09-05
@Zuckerberg

<div class="wrap">
  <div class="box box-1">1</div>
  <div class="box box-2">2</div>
  <div class="box box-3">3</div>
</div>

html, body {
  height: 100%;
  margin: 0;
}

.wrap {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.box {
  font-size: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 70px;
  height: 70px;
  background-color: green;
}

.box-3 {
  margin-top: auto;
}

V
Vladislav Lyskov, 2019-09-05
@Vlatqa

https://jsfiddle.net/t7e6p0yz/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question