Navbar under Jumbotron, huh?

Asked

Viewed 263 times

0

I’m creating a layout and I’m trying to put a navbar under a jumbotron but I’m not getting it. It turns out that the jumbotron gets a space at the top and the navbar is with a space between the jumbotron.

How to solve this ?

<!-- Header.cshtml to use as a Partial to include on main layout -->

<div class="jumbotron bg-red">
    <h1>My first layout</h1>
    <h3>Trying to create a layout using jumbotron and navbar</h3>
</div><!--jumbotron-->

<div class="navbar navbar-inverse navbar-static-top">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a href="@Url.Action("Index", "Home")" class="navbar-brand"><img src="~/Imagens/logo.png" width="32" height="32" title="Red Cherry" /></a>
        </div>
        <div class="navbar-collapse collapse">
            <ul class="nav navbar-nav">
                <li>@Html.ActionLink("Home", "Index", "Home")</li>
                <li>@Html.ActionLink("About", "About", "Home")</li>
                <li>@Html.ActionLink("Contact", "Contact", "Home")</li>
            </ul>
            @Html.Partial("_LoginPartial")
        </div>
    </div>
</div><!--nav bar-->

inserir a descrição da imagem aqui

1 answer

0

to solve this then you will have to tinker with the CSS of bootstrap, there the property that you are using if I am not mistaken has 48px of padding, it is only remove that solves the problem... so once even I removing I do not know why more on the server was still with space, more when I sent to the web server was with the employed changes!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.