LoginSignup
0
4

More than 5 years have passed since last update.

ブロック要素の上下左右中央揃え

Last updated at Posted at 2017-12-06
1 / 2

ブロック要素の上下左右中央揃え

結構シンプルに実現できます。

.center {
  margin: auto;
  position: absolute;

  top: 0;
  left: 0;
  right: 0;
  bottom: 0;

  height: 10.0em; //要調整
}

以上です。

0
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
4