css - Bootstrap - fill remaining vertical space -


this question has answer here:

i'm trying design layout using bootstrap. put logo , navbar but have insert remaining div.
need extend div (with question mark) remaining space of page (with margin picture).
don't know logo or navbar percentage height.

enter image description here

edit: post code (source page of yii framework)

 <a href="index.html"><img width="150" src="images/logo.png"/></a>  <nav class="navbar navbar-default">  <div class="container-fluid">     <div class="navbar-header">         <button class="navbar-toggle btn btn-default" data-toggle="collapse" data-target="#yii_booster_collapse_yw0" id="yw1" name="yt0" type="button">             <span class="icon-bar"></span>             <span class="icon-bar"></span>             <span class="icon-bar"></span>         </button></div>         <div class="collapse navbar-collapse" id="yii_booster_collapse_yw0">             <ul id="yw2" class="nav navbar-nav">                 <li class="active">                     <a href="index.php/site/home">home</a>                 </li>             </ul>             <ul class="pull-right nav navbar-nav" id="yw3">                 <li>                     <a href="index.php/user/profile/edit">profile</a>                 </li>                 <li class="dropdown">                     <a class="dropdown-toggle" data-toggle="dropdown" href="index.php/site/home">options <span class="caret"></span>                     </a>                     <ul id="yw4" class="dropdown-menu">                         <li>                             <a tabindex="-1" href="index.php/site/contact">contact us</a>                         </li>                         <li>                             <a tabindex="-1" href="index.php/user/profile/changepassword">change password</a>                         </li>                     </ul>             </ul>         </div>     </div>    </div>  </nav>  <div id="content">      fill vertical space  </div> 

i need fill remaining space, not logo/brand problem.

you see in css used calc() in heightvalue subtraction.

first viewport height of device screen size using 100vh subtract height used above div want fill take rest of screen.

here fiddle.

does help?

ps: commented in nav code have divand added </li>.

.block {   height: -webkit-calc(100vh - 72px);   height: -moz-calc(100vh - 72px);   height: calc(100vh - 72px);   background-color: rgba(90,90,190,0.8); }  

Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -