

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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 Questions & Answers
- Set disabled state for Bootstrap Buttons
- Add sizes for Bootstrap Buttons
- Set Bootstrap badges in active states of pill
- Primary action in a set of Bootstrap buttons
- Set Bootstrap badges in active states of list navigation
- Bootstrap active Contextual class
- Make a set of buttons appear vertically with Bootstrap
- Active Nav States in Bootstrap
- Add buttons in Bootstrap Navbar
- 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
- Select records with ACTIVE status in MySQL set with ENUM
- Set negative action for Bootstrap 4 cards with red background color
Advertisements