Set height of CSS flex elements to the same amount?
问题 I have 2 divs next to each other that I center vertically and horizontally using flex and justify-content/align-items. Example HTML: <div class="inner"> <div class="section green"> <img src="http://i.imgur.com/hEOMgVf.png"> </div> <div class="section red"> <img src="http://i.imgur.com/nEybO1g.png"> </div> </div> CSS: .inner { float: left; width: 500px; display: flex; justify-content: center; align-items: center; background-color: #343434; text-align: center; } .section { float: left; flex: 1;