Q
Q
qwerty17772018-05-23 16:06:04
css
qwerty1777, 2018-05-23 16:06:04

How to scatter 2 elements vertically?

How to scatter 2 elements vertically? So that 1 element is strictly on top, and the 2nd is strictly pressed against the bottom of the parent?
https://jsfiddle.net/yh3fvtq0/

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Sharomet, 2018-05-23
@qwerty1777

html,body {
  height: 100%;
}
.wrapper {
  width: 100%;
  height: 100%;
  flex-direction: column;
  display: flex;
  justify-content: space-between;
}
.item {
  margin: 5px;
  width: 150px;
  height: 150px;
  background: pink;
}

T
tyzberd, 2018-05-23
@tyzberd

https://jsfiddle.net/yh3fvtq0/1/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question