- 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 sizes for Bootstrap Buttons
To add size for buttons in Bootstrap, try the following classes:
Class | Description |
---|---|
.btn-lg | This makes the button size large. |
.btn-sm | This makes the button size small. |
.btn-xs | This makes the button size extra small. |
.btn-block | This creates block level buttons—those that span the full width of a parent. |
Example
You can try to run the following code to create a small button −
<!DOCTYPE html> <html> <head> <title>Bootstrap Example</title> <meta name = "viewport" content = "width = device-width, initial-scale = 1"> <link rel = "stylesheet" href = "https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css"> <script src = "https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src = "https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script> </head> <body> <button type = "button" class = "btn btn-default btn-sm"> Small button </button> </body> </html>
- Related Articles
- Add buttons in Bootstrap Navbar
- Add dropdown menu to buttons using Bootstrap
- Set active state for Bootstrap Buttons
- Set disabled state for Bootstrap Buttons
- What are the sizes of the icons in Android notifications action-buttons?
- Add feedback icons for inputs with Bootstrap
- Primary action in a set of Bootstrap buttons
- Group buttons on a single line with Bootstrap
- Make a set of buttons appear vertically with Bootstrap
- Preappend or Append radio buttons and checkboxes with Bootstrap
- Align flex items around on different screen sizes in Bootstrap
- How to add Social Share buttons in Django?
- Display flex items vertically on different screen sizes in Bootstrap 4
- Fractional font sizes for HTML5 Canvas?
- Align flex items in the center on different screen sizes in Bootstrap

Advertisements