LoginSignup
41

More than 5 years have passed since last update.

`display:inline-block;` が微妙に下にずれる問題の解決方法

Last updated at Posted at 2017-09-27

同じ HTML 要素に vertical-align:top; を設定すれば良い。
原因はインライン要素のデフォルトがベースライン合わせだからっぽい。

div {
    display: inline-block;
    vertical-align: top;
}

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
41