縦並びにしたかったので、以下のようにしました。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
<div class="flex"> <p><img class="img-responsive" src="hoge" alt=""></p> <p>ホゲ</p> <p>ホゲ</p> </div> <style> .flex{ display: flex; justify-content: space-between; flex-direction: column; width: 200px; height: auto; } .img-responsive{ display: block; max-width: 100%; height: auto; } </style> |
IEで確認したところimgの高さが考慮されず、もともとの高さが適用されてしまいました。