Div内の内容をタテ・ヨコ中央へしたいときのCSS
.divのclass{
width:400px;
height: 400px;
align-items: center;
justify-content: center;
display: flex;
}
ブラウザが新しくないとダメっぽいけど、とりあえずちゃんとタテ・ヨコ中央になった。
More than 5 years have passed since last update.
Div内の内容をタテ・ヨコ中央へしたいときのCSS
.divのclass{
width:400px;
height: 400px;
align-items: center;
justify-content: center;
display: flex;
}
ブラウザが新しくないとダメっぽいけど、とりあえずちゃんとタテ・ヨコ中央になった。
Register as a new user and use Qiita more conveniently