89
71

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

グリッドスタイルで高さを同じにする

Last updated at Posted at 2016-10-25

bootstrap を使って横並びを作ろうとすると、高さがバラバラになる

スクリーンショット 2016-10-25 19.38.18.png

高さを指定せずに揃えたいので、

col-* クラスを指定している一つ上の要素に「row-eq-height」を追加

<div class="container">
	<div class="row row-eq-height">
		<div class="col-md-2">
			テスト<br>
			テスト<br>
			....(略)....

さらにCSSを追加

.row-eq-height {
    display: flex;
    flex-wrap: wrap;
}

高さが統一されます。

スクリーンショット 2016-10-25 19.44.16.png

89
71
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
89
71

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?