how to make a fixed navigation bar with the background image?

advertisements

strong text*

]2*

*


**I have tried these html, and CSS codes to get the desired result. What else should I add or substract to my HTML or CSS? suggest please.

 <div class="firstPart">
          <nav class="navbar navbar-default navbar-fixed-top">
              <div class="container-fluid">
                  <!-- Brand and toggle get grouped for better mobile display -->
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                        <a class="navbar-brand" href="#">Gustoso</a>
                </div>

            <!-- Collect the nav links, forms, and other content for toggling -->
            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav">
                    <li class="active"><a href="#">Welcome<span class="sr-only">(current)</span></a></li>
                    <li><a href="#">Menu</a></li>
                    <li><a href="#">Reservation</a></li>
                    <li><a href="#">News</a></li>
                    <li><a href="#">Contact</a></li>
                </ul>
            <ul class="nav navbar-nav navbar-right">
                <li><i class="fa fa-twitter"></i></li>
                <li><i class="fa fa-twitter"></i></li>
                <li><i class="fa fa-twitter"></i></li>
            </ul>
                </div><!-- /.navbar-collapse -->
            </div><!-- /.container-fluid -->
       </nav>

    </div> <!--.firstPart-->
    <section class="headerArea">
        <h1>Pastry With Love</h1>

    </section><!--.headerArea-->

Here is the css:

body {
    margin: 0;
    padding: 0;
    font-size: 14px;
    color: black;
    background-color: #f3f1f2;
}
.firstPart {
    background: url('bannerFirst.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    min-height: 100%;
    padding-top: 0px;
    padding-bottom: 957px;
}
.navbar-default {
    background: none;
}
.navbar-default .navbar-collapse {
    border-color: #e7e7e7;
    background-color: transparent;
}
.backgroundImage {
    width: device-width;
}
.nav navbar-nav {
    font-size: 14px;
    font-family: "Alegreya";
    color: rgb(255, 255, 255);
    text-transform: uppercase;
    line-height: 1.714;
    position: absolute;
    left: 413.844px;
    top: 23.002px;
    z-index: 275;
    display: inline-block;
    padding-right: 44px;
    padding-top: 4px;
}
.headerArea {
    color: white;
    font-size: 30px;
    margin-top: -360px;
    margin-left: 375px;
}


position:fixed;
top:0;
left:0;

take a look at this

If this is not the one, can you please give ur code in jsfiddle:) thanks