- 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
Center tabs in Bootstrap
Use the .nav-justified class in Bootstrap to center tabs in Bootstrap.
You can try to run the following code to center tabs −
Example
<!DOCTYPE html> <html> <head> <title>Bootstrap Example</title> <link rel = "stylesheet" href = "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> <script src = "https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src = "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> </head> <body> <div class = "container"> <h2>Web Development</h2> <p>The following are the web dev technologies:</p> <ul class = "nav nav-pills nav-justified" role = "tablist"> <li class = "active"><a href = "#">HTML5</a></li> <li><a href = "#">jQuery</a></li> <li><a href = "#">JavaScript</a></li> <li><a href = "#">Ajax</a></li> <li><a href = "#">ES6</a></li> </ul> </div> </body> </html>
- Related Articles
- Using Bootstrap nav-tabs class
- Tabs With Dropdown Bootstrap Example
- Vertically stack tabs with Bootstrap
- Bootstrap 4 .card-header-tabs class
- Center any element in Bootstrap
- Bootstrap class center-block
- Style navigation tabs inside the Bootstrap 4 card header
- Bootstrap 4 .justify-content-*-center class
- Set element to center with Bootstrap
- Align gathered items in the center in Bootstrap 4
- Align a flex item in the center with Bootstrap 4
- Align single rows of items in the center with Bootstrap 4
- Align gathered items in the center on different screens in Bootstrap 4
- Align flex items in the center on different screen sizes in Bootstrap
- How to Align Navbar Items to Center using Bootstrap 4?

Advertisements