C# Jadu
  • Home
  • Asp.net
  • Web Design
    • Html
    • Css
    • Java Script
  • Bootstrap
  • Sql
    • Queries
    • Stored Procedures
  • About Me
    • About Myself
    • My Projects
    • My CV
  • Gallery
  • Do you Know?

Friday, 9 October 2015

How to make a responsive nav-bar in bootstrap?

 Deepak Chaudhary     13:31     Bootstrap     No comments   

Hi Friends...
The navbar is one of the best features of Bootstrap. Navbars are responsive 'meta' components that serve as navigation headers for your application or site. Navbars collapse in mobile views and become horizontal as the available viewport width increases. At its core, the navbar includes styling for site names and basic navigation.

Default Navbar

To create a default navbar:
  • Add the classes .navbar, .navbar-default to the <nav> tag.
  • Add role="navigation" to the above element, to help with accessibility.
  • Add a header class .navbar-header to the <div> element. Include an <a> element with class navbar-brand. This will give the text a slightly larger size.
  • To add links to the navbar, simply add an unordered list with the classes of .nav, .navbar-nav.
The following example demonstrate this:
<nav class="navbar navbar-default" role="navigation">
   <div class="navbar-header">
     <a class="navbar-brand" href="http://csharpjadu.blogspot.in/">C# Jadu</a>
   </div>
   <div>
      <ul class="nav navbar-nav">
         <li class="active"><a href="#">HTML</a></li>
         <li><a href="#">CSS</a></li>
         <li class="dropdown">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
               SQL 
               <b class="caret"></b>
            </a>
            <ul class="dropdown-menu">
               <li><a href="#">TABLES</a></li>
               <li><a href="#">SP</a></li>
               <li><a href="#">QUERIES</a></li>
              <li class="divider"></li>
               <li><a href="#">OTHERS</a></li>
            </ul>
         </li>
      </ul>
   </div>
</nav>
 Your design will look like this 
C# jadu

  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
Email ThisBlogThis!Share to XShare to Facebook
Newer Post Older Post Home

0 comments:

Post a Comment

Most Popular posts

  • How To Create Image wipe Effect With CSS3 Webkit Animation
    Hi Friends... In this article we learn how to create a Image wipe effect with CSS3. CSS transition and animations provide a way for web de...
  • CSS 3D Cube
    Hi Friends... CSS cubes really showcase what CSS has become over the years, evolving from simple color and dimension directives to a lang...
  • CSS 3D Transforms
    Hi Friends... There is nothing more flashy and full with eye-candy than an impressive 3D CSS demo. Although its utility outside of demos ...

About Me

Deepak Chaudhary
View my complete profile

Copyright © C# Jadu | Powered by Blogger
Design by Deepak Chaudhary