There is a container with blocks on bootstrap . How to make a universal (do not depend on the amount of text and block height) an adaptive version of aligned text boxes in horizontal and vertical center with ie9+ cross-browser ie9+ ? Fidl Practically it turned out to be done, the only thing is that if a certain height is needed for the main unit, then this does not work. How to bring to the universal option?
.main { background-color: #231f20; color:#fff; min-height: 100px; height:1px; } .container { height: 100%; background-color: red; } .table { display:table; table-layout: fixed; width:100%; height: 100%; background-color: blue; margin-bottom:0; } .table-cell { display:table-cell; vertical-align:middle; text-align: center; float: none !important; background-color: green; height: 100%; } p { margin: 0; } <link href="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" /> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script src="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script> <div class="main"> <div class="container"> <div class="row"> <div class="table"> <div class="col-sm-3 table-cell"> <p>test</p> </div> <div class="col-sm-3 table-cell"> <p>test<br />test</p> </div> <div class="col-sm-3 table-cell"> <p>test<br />test<br />test</p> </div> <div class="col-sm-3 table-cell"> <p>test<br />test</p> </div> </div> </div> </div> </div>
ie9+- read the description carefully.flexis not a universal option .. - Vasya