0
以下是我的代碼。我把整個頁面按高度分爲20%,50%,30%;將頁面按高度劃分,不擴展至全部指定高度
但由於某種原因,SECOND SECTION
中的表未達到整個50%。只有10%。它位於一個流體中。如果我把隱藏的溢出,只有標題將是可見的。
CSS:
.body-wrapper{
height:100%;
}
.body-wrapper > fieldset div:nth-of-type(1){
height:20%;
}
.body-wrapper > fieldset div:nth-of-type(2){
height:40%;
}
.body-wrapper > fieldset div:nth-of-type(3){
height:30%;
}
HTML:
<div class = "main-Frame container-fluid"> <!-- mid section -->
<div class="well row-fluid" >
<div class="body-wrapper">
<fieldset>
<div> <!-- FIRST SECTION -->
<legend>User Profile</legend>
<div class="row-fluid">
<div class="col-md-2 text-right">User Name
</div>
<div class="col-md-4" >
<input style="width:90%;"type="text" placeholder="username"/>
</div>
<div class="col-md-2 text-right">User Email
</div>
<div class="col-md-3">[email protected]
</div>
<div class="col-md-1">
<input type="checkbox"/>Active
</div>
</div>
</div> <!-- END OF FIRST SECTION -->
<div> <!-- SECOND SECTION -->
<legend>Application Defaults</legend>
<div class = "container-fluid" style="height:100%;">
<div class="row-fluid" style="height:100%;">
<div class="col-md-10" style="height:100%;">
<div class="table-responsive user-table">
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>App</th>
<th>Type</th>
<th>Setting</th>
<th>check</th>
</tr>
</thead>
<tbody>
<tr>
<td>first</td>
<td>first</td>
<td>first</td>
<td>first</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="col-md-2">
</div>
</div>
</div>
</div> <!-- END of SECOND section -->
<div> <!-- LAST section -->
<legend>ChangePassword</legend>
</div> <!-- END of footer section -->
</fieldset>
</div>