- 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
Set active state for Bootstrap Buttons
To set the active state for Bootstrap Buttons, use the .active class.
The button will appear pressed as in the following code
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> <p>The following are some buttons:</p> <button type = "button" class = "btn btn-default btn-lg "> Default Button </button> <button type = "button" class = "btn btn-default btn-lg active"> Active Button </button> </body> </html>
- Related Articles
- Set disabled state for Bootstrap Buttons
- Add sizes for Bootstrap Buttons
- Primary action in a set of Bootstrap buttons
- Set Bootstrap badges in active states of pill
- Make a set of buttons appear vertically with Bootstrap
- Set Bootstrap badges in active states of list navigation
- Bootstrap active Contextual class
- Add buttons in Bootstrap Navbar
- Active Nav States in Bootstrap
- Add dropdown menu to buttons using Bootstrap
- Group buttons on a single line with Bootstrap
- Preappend or Append radio buttons and checkboxes with Bootstrap
- Set a rounded active and hover button with CSS
- Set negative action for Bootstrap 4 cards with red background color
- Select records with ACTIVE status in MySQL set with ENUM

Advertisements