Remove the extra padding from the navigation bar

advertisements

I want to remove extra padding from navbar but not able to do even after making bottom padding 0.It is below navbar options. Also i have searched on web but not able to get solution. Below is the html code

<div class="navbar  navbar-fixed-top" role="navigation">

        <div class="navbar-header">
            <div class="navbar-header">
                <a class="navbar-brand" href="#">
                    <img style="max-width: 100px; margin-top: -7px;"
                        src="images/Logo.png">
                </a>
                <div class="complete">

                </div>
            </div>
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
        </div>

        <div class="collapse navbar-collapse">
            <ul class="nav navbar-nav pull-right">
                <li><a href="#">Link</a></li>

            </ul>

        </div>

        <div class="navbar navbar-inverse navbar-static-top" style="background-color: gray;" role="navigation">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
            </div>

            <div class="collapse navbar-collapse" style="background-color: lightgray;">

                <ul class="nav navbar-nav">
                    <li role="presentation"><a runat="server" href="/Default">Home</a></li>
                    <li role="presentation"><a runat="server" href="/Report"> Report</a></li>
                    <li role="presentation"><a runat="server" href="/server">server</a></li>
                    <li role="presentation"><a runat="server" href="/Engine">Management</a></li>
                    <li role="presentation"><a runat="server" href="/Class">Management</a></li>
                    <li role="presentation"><a runat="server" href="/User">User</a></li>
                </ul>
            </div>
        </div>
    </div>

and CSS code

 `
  /* --- Style --- */
  body {
  padding-top: 150px;
  }

  .navbar{
     background-color:darkseagreen;
     margin-bottom: 0;
     }

  .navbar-header{
     background-color:darkseagreen;
     padding-top: 4px;
     padding-bottom:4px;
  }
  .nav {
     background-color:forestgreen;
     margin-top:0px;
     margin-bottom:0px;
  }
  `

Any help would be great. Thanks in advance


Try like this once and don't add style to this code and check it once.

<div class="navbar  navbar-fixed-top" role="navigation">
<div class="navbar-header">
    <div class="navbar-header">
        <a class="navbar-brand" href="#">
            <img style="max-width: 100px; margin-top: -7px;"
                src="images/Logo.png">
        </a>
        <div class="complete">

        </div>
    </div>
    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
    </button>
</div>
<div class="navbar navbar-inverse navbar-static-top" style="background-color: gray;" role="navigation">
    <div class="navbar-header">
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
        </button>
    </div>
    <div class="collapse navbar-collapse" style="background-color: forestgreen;">
        <ul class="nav navbar-nav">
            <li role="presentation"><a runat="server" href="/Default">Home</a></li>
            <li role="presentation"><a runat="server" href="/Report"> Report</a></li>
            <li role="presentation"><a runat="server" href="/server">server</a></li>
            <li role="presentation"><a runat="server" href="/Engine">Management</a></li>
            <li role="presentation"><a runat="server" href="/Class">Management</a></li>
            <li role="presentation"><a runat="server" href="/User">User</a></li>
        </ul>
        <ul class="nav navbar-nav pull-right">
         <li><a href="#">Link</a></li>
        </ul>
    </div>
</div>