html - CSS: Flex equal height columns and vertical center content -
i'm struggling content in left , right columns vertically middle aligned
https://jsfiddle.net/klm7j7zq/
<div class="equalizer"> <div class="block1"> <div class="inner"><p> block 1 </p></div> </div> <div class="content">lorem ipsum dolor sit amet, consectetur adipisicing elit. labore, vel, quia. non nostrum, consectetur ipsum doloribus enim maiores laudantium, odio vel blanditiis id ea dolorum expedita fugit incidunt commodi.lorem ipsum dolor sit amet, consectetur adipisicing elit. labore, vel, quia. non nostrum, consectetur ipsum doloribus enim maiores laudantium, odio vel blanditiis id ea dolorum expedita fugit incidunt commodi.lorem ipsum dolor sit amet, consectetur adipisicing elit. labore, vel, quia. non nostrum, consectetur ipsum doloribus enim maiores laudantium, odio vel blanditiis id ea dolorum expedita fugit incidunt commodi.</div> <div class="block2"><div class="inner2"><p> block 2 </p></div></div> </div>
scss
.equalizer{ display: flex; flex-direction: row; align-content: center; *{ display: flex; background: pink; flex:1; align-content: center; } .block2{background: yellow;} }
how fix , importantly have work on safari , chrome?
.equalizer { display: flex; flex-direction: row; align-content: center; background: pink; } .equalizer * { display: flex; flex: 1; align-content: center; } .equalizer .block2 { background: yellow; } .block1, .inner2 { align-self: center; }
<div class="equalizer"> <div class="block1"> <div class="inner"> <p> block 1 </p> </div> </div> <div class="content">lorem ipsum dolor sit amet, consectetur adipisicing elit. labore, vel, quia. non nostrum, consectetur ipsum doloribus enim maiores laudantium, odio vel blanditiis id ea dolorum expedita fugit incidunt commodi.lorem ipsum dolor sit amet, consectetur adipisicing elit. labore, vel, quia. non nostrum, consectetur ipsum doloribus enim maiores laudantium, odio vel blanditiis id ea dolorum expedita fugit incidunt commodi.lorem ipsum dolor sit amet, consectetur adipisicing elit. labore, vel, quia. non nostrum, consectetur ipsum doloribus enim maiores laudantium, odio vel blanditiis id ea dolorum expedita fugit incidunt commodi. </div> <div class="block2"> <div class="inner2"> <p> block 2 </p> </div> </div> </div>
Comments
Post a Comment