Search This Blog

Translate

nav bar in bootstrap 3 how you can apply own style

IRtutor.blogspot.com Example of Twitter Bootstrap 3 Static Navbar Extended

Interactive nav bar in bootstrap 3 how you can apply own style part 1

Today we learn how to can apply own style in bootstrap 3 nav bar
  • First you will add the bootstrap 3 library place in head tag.
  • Then add your own css in head tag.
Nave bar image
<!-- HTML generated using hilite.me
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>

Now you will Add the Css with in head tag.


<style type="text/css">
   
    .mynav{
        
     background-image: linear-gradient(#54B4EB, #2FA4E7 60%, #1D9CE5);
     background-repeat: no-repeat;
     border-bottom: 1px solid #178ACC;
     box-shadow: 0px 1px 10px rgba(0, 0, 0, 0.1);
     border-radius: 0px;
}

.navbar-default {
     background-color: #7C63FA;
     border-color: #000000;
}

.navbar-default .navbar-brand,
.navbar-default .navbar-brand:hover,
.navbar-default .navbar-brand:focus ,
.navbar-default .navbar-nav > li > a {
     color: #FFF;
}

.navbar-default .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > li > a:focus {
     color: #FFF;
     background-color: #948BBF;
}
  
</style>

You will add nav bar code with in body tag.


 <nav role="navigation" class="navbar navbar-default">
       
        <div class="navbar-header myvav">
            <button type="button" data-target="#navbarCollapse" data-toggle="collapse" class="navbar-toggle">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a href="#" class="navbar-brand">Brand</a>
        </div>
        <!-- Collection of nav links, forms, and other content for toggling -->
        <div id="navbarCollapse" class="collapse navbar-collapse">
            <ul class="nav navbar-nav">
                <li class="active"><a href="#">Home</a></li>
                <li><a href="#">Profile</a></li>
                <li class="dropdown">
                    <a data-toggle="dropdown" class="dropdown-toggle" href="#">Messages <b class="caret"></b></a>
                    <ul role="menu" class="dropdown-menu">
                        <li><a href="#">Inbox</a></li>
                        <li><a href="#">Drafts</a></li>
                        <li><a href="#">Sent Items</a></li>
                        <li class="divider"></li>
                        <li><a href="#">Trash</a></li>
                    </ul>
                </li>
            </ul>
            <form role="search" class="navbar-form navbar-left">
                <div class="form-group">
                    <input type="text" placeholder="Search" class="form-control">
                </div>
            </form>
            <ul class="nav navbar-nav navbar-right">
                <li><a href="#">Login</a></li>
            </ul>
        </div>
    </nav>

Now your interactive nav bar is ready.

"Nav
Just you will add css and you will make interactive nav bars part2 please wait 5sec and skip add
-->