1
Hello, my question is the following, I’m trying to put a container-Fluid exactly under a div Fixed-top of Boostrap, where it contains a navbar Menu and a ul, I had to put to leave the two fixed at the top. I had to use css in Body to make room in the content, because the div was overwriting. I need to know if you can do it.
CSS:
body {
padding-top: 200px;
}
@media (min-width: 768px) {
body {
padding-top: 107px;
}
}
<div class="fixed-top">
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container">
<a class="navbar-brand" href="#">Share Sound</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar" aria-controls="navbarTogglerDemo03" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbar">
<div class="container-fluid">
<div class="row">
<div class="col-md-9">
<form class="form-inline">
<div class="input-group">
<span class="input-group-addon" id="basic-addon1">
<label for="nav_pesquisa" class="fa fa-search"></label>
</span>
<input type="text" class="form-control" placeholder="Pesquisar" aria-label="Pesquisa" aria-describedby="Pesquisa" name="nav_pesquisa" id="nav_pesquisa">
<button class="btn btn-outline-success" type="submit">Search</button>
</div>
</form>
</div>
<div class="col-md-3">
<div class="btn-group dropdown" id="dropdown-form-topo">
<button class="btn btn-secondary dropdown-toggle" type="button" id="drop-login-cadastro" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Login / Cadastrar-se <i class="fa fa-user" aria-hidden="true"></i>
</button>
<div class="dropdown-menu" id="dropdown-form-info" aria-labelledby="drop-login-cadastro">
<form>
<div class="form-group">
<label for="Email">Email</label>
<input type="email" class="form-control" id="Email" aria-describedby="Email" placeholder="Enter email">
</div>
<div class="form-group">
<label for="Senha">Senha</label>
<input type="password" class="form-control" id="Senha" placeholder="Password">
</div>
<div class="form-check">
<label class="form-check-label">
<input type="checkbox" class="form-check-input">
Check me out
</label>
</div>
<div class="text-center">
<button type="submit" class="btn btn-outline-dark">Fazer Login</button>
</div>
</form>
<div class="text-center">
<small class="form-text text-muted">———— OU ————</small>
</div>
<div class="text-center" id="cad_conta">
<a class="dropdown-item" href="#">Cadastre-se</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</nav>
<ul class="nav nav-expand-lg nav-pills nav-fill" id="ul-menu-topo">
<li class="nav-item">
<a class="nav-link" href="#"><i class="fa fa-home" aria-hidden="true"></i>Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#"><i class="fa fa-user" aria-hidden="true"></i>Perfil</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#"><i class="fa fa-commenting-o" aria-hidden="true"></i>Discussões</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#"><i class="fa fa-music" aria-hidden="true"></i>Músicas</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#"><i class="fa fa-trophy" aria-hidden="true"></i>Recordes</a>
</li>
</ul>
</div>
<div class="container-fluid text-center" id="cont-2">
<div class="text-center" id="sub-titulo">
<center>
<div id="back-title">
<p class="h2">Share Sound</p>
<span>Tentando proporcionar a arte tradicional da musica, <br>novas produções e
infinitas possibilidades.<br></span>
</div>
<img src="music4.jpg" class="col-md-12">
</center>
</div>
</div>
Do you use jQuery?
– Sam
@Dvdsamm Yes, I use
– Monroe Say
I’ll post an answer using jQuery and see if it suits you.
– Sam