LoginSignup
5
5

More than 5 years have passed since last update.

Chrome 41だとflex justify-content: centerを上書きしてspace-betweenとかすると始点がおかしくなる。

Posted at

↓みたいな感じで、ベースのクラスにjustify-content:centerつけてるけど、一部space-betweenにしたいんだよねって時に

.flex-base {
  color: #fff;
  display: flex;
  margin: 15px auto 0;
  justify-content: center;
}

.flex--justify {
  justify-content: space-between;
}
  <div class="flex-base flex--justify">
    <div class="flex__item">A</div>
    <div class="flex__item">B</div>
  </div>

DEMO:

↓Chrome 41だと崩れる。

chrome41.png

↓Chrome 43だとOK

Chrome_canary.png

↓Vivaldiもついでに崩れてる。

Vivaldi.png

↓ Safari 7.1.3
safari.png

↓Firefox 36
firefox.png

Stack overflow探すと案の定

Chrome 42ではなおるから安心してだって

つらい・・・ :cry:

5
5
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
5
5