julian julian - 1 month ago 10
CSS Question

Vertically align a stretched a flexbox item

I wonder how i can set an item inside a

display: flex
container to
align-self: strech
and let it be vertically aligned in the middle at the same time.

I've created a Fiddle to showcase my problem. The element "My Logo Text"
should be at the same vertical level as "My Banner" and "Right Container"

Answer

Add:

.logo {
  display: flex;
  align-items: center;
  height: 100%
}