K
K
KG2016-03-03 13:48:57
css
KG, 2016-03-03 13:48:57

Why doesn't an inline block align to the bottom?

codepen.io/anon/pen/MywqmV?editors=1100
We need to put the orange element on the bottom edge of the green one. It seems like I'm doing everything right, but I don't want to get up. I don’t consider the relative option on the parent and absolute on the child, it’s necessary with vertical-align.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Fedorov, 2016-03-03
@pwnography

Add to your css:

.first_one:after {
  content:'';
  vertical-align: bottom;
  display: inline-block;
  height: 100%;
}

For night reading: https://habrahabr.ru/company/netcracker/blog/277433/

R
Ruslan Galiev, 2016-03-03
@ruslanredo

You can set the green block to line-height: 500px;
Then return to orange line-height: 1.5em;
codepen.io/anon/pen/pyJxjq

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question