1. center an element vertically

  - accepted / - tried

This is a very basic question and good to be the first CSS problem on BFE.dev.

Suppose you have an HTML structure as below

<div class="outer">
  <div class="inner">
</div>

Please center the inner div vertically without changing their dimensions and colors.

1.Should be centered vertically

2.even if container size changes

Discuss(27)