I am working with MVC 5 and in my Layout "_Layout.cshtml" I want to put a header
<header>
<div class="jumbotron">
<h2>Bienvenido</h2>
</div>
</header>
However, the header does not appear at the edge of the window but a little lower:
so try this:
<style>
.jumbotron
{
margin-top: 0;
}
</style>
and it still didn't work, but if I change the property to margin-top: 50px; or etc, if it does change any idea why?
Do you have 2 important issues?
1) the body has a default margin and padding. To solve it you can do the following with css:
2) The tags h1,h2,etc also have a default margin. Also solved with css.
I leave you here an HTML code that works correctly for me.
The first thing I can mark is that the
Jumbotron
bootstrap is not defined within the tag,<header>
you should be in the<body>
Bootstrap Jumbotron
On the other hand that space can be generated because by default the page has an
margin
established, which you could remove with css if you define