When you create a MVC project in Visual Studio 2015, a default _Layout.cshtml page is created. The markup includes the following DIV (I changed the div a bit):
<div class= "navbar navbar-collapse collapse navbar-fixed-top">
<ul class="nav navbar-nav">
<li>@Html.ActionLink("Home", "Index", "Home")</li>
<li>@Html.ActionLink("Users", "Users", "Home")</li>
<li>@Html.ActionLink("General", "General", "Home")</li>
<li>@Html.ActionLink("Customer Portal", "CustomerPortal", "Home")</li>
Open in new window
I want to reduce the height of the div and all its elements to about 25 px,, and move the rest of the body content up to fill in the space created.
As for the spacing, it's likely caused by the margins paddings and line-spacing of various elements including the navbar class, the nav class, the <li> elements and the <a> elements. For example, the .navbar class will probably have a padding added to the top and bottom, the .nav-link class will probably have padding added top and bottom. The entire nav will likely have bottom margins.
Can't give you specifics but if you load up your web page, and then use the web dev tools that are built into modern browser (press your F12 key), then you should be able to see exactly what elements have what spacing. The dev tools will also show you where and in which CSS file this spacing is added, so you can easily edit it.
If you want us to take a look and offer futher advice, post up a link to your site - just a working demo - and we can examine the HTML and CSS directly.