Hello, tell me, can anyone come across.

<div class="container-fluid maincontainer"> <div class="main-left-right">adf</div> </div> 

The parent element .maincontainer normally displayed and has height:100% , and the child .main-left-right not ( min-height:100%; height:100%; )

  • More code lay out. If the parent has height: 100%, then the parent should also have the height set: 100% - user190134

2 answers 2

Perhaps the parent does not have a height of 100%

 html, body, .maincontainer, .main-left-right { height: 100%; } /* Стили для наглядности */ .maincontainer { background: #eee; padding: 1rem; } .main-left-right { min-height: 100%; background: #ccc; } html, body { margin: 0; padding: 0; } * { box-sizing: border-box; } 
 <div class="container-fluid maincontainer"> <div class="main-left-right">adf</div> </div> 

    Magic. body, html skopipastil and earned

     html, body, .maincontainer, .main-left-right { height: 100%; } /* Стили для наглядности */ .maincontainer { background: #eee; padding: 1rem; } .main-left-right { min-height: 100%; background: #ccc; } html, body { margin: 0; padding: 0; } * { box-sizing: border-box; } 
     <div class="container-fluid maincontainer"> <div class="main-left-right">adf</div> </div>