- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Add buttons in Bootstrap Navbar
Add buttons using class .navbar-btn to <button> elements. You can try to run the following code to add a button to the navbar
Example
<!DOCTYPE html> <html> <head> <title>Bootstrap Example</title> <link href = "/bootstrap/css/bootstrap.min.css" rel = "stylesheet"> <script src = "/scripts/jquery.min.js"></script> <script src = "/bootstrap/js/bootstrap.min.js"></script> </head> <body> <nav class = "navbar navbar-default" role = "navigation" style="background: red;color:white;"> <div class = "navbar-header"> <a class = "navbar-brand" href = "#">Example</a> </div> <div> <form class = "navbar-form navbar-left" role = "search"> <div class = "form-group"> <input type = "text" class = "form-control" placeholder = "Search here..."> </div> <button type = "submit" class = "btn btn-default">Submit Button</button> </form> <button type = "button" class = "btn btn-default navbar-btn">Navbar Button</button> </div> </nav> </body> </html>
- Related Articles
- Add responsive features to Bootstrap navbar
- Add sizes for Bootstrap Buttons
- Add dropdown menu to buttons using Bootstrap
- Create Inverted Navbar in Bootstrap
- Bootstrap navbar-default class
- Create Default Bootstrap Navbar
- Bootstrap navbar-inverse class
- Bootstrap navbar-static-top class
- Add a gray background color to the active link in a default Bootstrap navbar
- Wrap Strings of Text in Bootstrap Navbar
- Usage of Bootstrap navbar-form class
- Usage of Bootstrap navbar-btn class
- Usage of Bootstrap navbar-text class
- Change HTML navbar color in Twitter Bootstrap 2.0.4
- Fix navbar to the top with Bootstrap

Advertisements