What causes the page to occupy 100% of the viewport, so that it does not have a scroll bar. Whether it's a small, medium, large, tablet, or desktop phone.
The height must be fixed, occupying the entire screen. No scrollbar. Do you understand what I want to do?
I put in css the height as 100% and also some variations but without success.
The layout will have at the top only a navbar and a very large title, the center an image and the footer.
How do I do this?
CSS: * {
margin: 0;
padding: 0;
}
body {
height: 100%;
}
HTML:
<nav class="navbar navbar-default navbar-fixed-top"> <!-- "navbar-fixed-top" barra fixa no topo -->
<div class="container-fluid">
<div class="navbar-header"> <!-- MENU RESPONSIVO -->
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#barra">
<!--- Barra responsiva -->
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="#" class="navbar-brand"> Menu </a>
</div>
<div class="collapse navbar-collapse" id="barra"> <!-- exibição de conteúdo do menu em qualquer tamanho/resolução -->
<ul class="nav navbar-nav">
<li><a href="#">Link 1</a></li>
<li><a href="#">Link 3</a></li>
</ul>
<form action="" class="navbar-form navbar-right" role="search">
<div class="form-group">
<input type="text" class="form-control" placeholder="Pesquisar"></input>
</div>
<button type="submit" class="btn btn-default"> Buscar </button>
</form>
</div>
</div>
</nav>
<br>
<div class="container-fluid">
<div class="row">
<section>
<img class="col-md-4" src="img/071.JPG">
</section>
</div>
</div>
<footer> </footer>