html5 - CSS vertical align block in a container -
any way align .col
top, matching height of siblings above?
here current solution maintaining equal height , width.
<div class="row"> <div class="col">...</div> <div class="col">...</div> </div> .row { display: flex; /* assigns equal height children */ } .col { flex: 1; /* assigns, equal width*/ }
this solution backwards support browser such ie8,9 :
.row { display: table; } .col { display: table-cell; width: 50%; /* depends on number of columns, 50% 2 col, 25% 4 column , on*/ }
Comments
Post a Comment