Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I increase the size of a bootstrap button?

For example I've made my button

<div class="btn btn-default">   Active </div> 

and it looks like the following

enter image description here

However I would like to have my button like this

enter image description here

How can I enlarge the width of the bootstrap button regardless of text size?

like image 669
Alex Shmatko Avatar asked Sep 30 '15 11:09

Alex Shmatko


People also ask

How do I enlarge a button in Bootstrap?

Fancy larger or smaller buttons? Add .btn-lg or .btn-sm for additional sizes. Create block level buttons—those that span the full width of a parent—by adding .btn-block .

Which class will you use to make a large button using Bootstrap?

To create a large button, use the . btn-lg class in Bootstrap.


1 Answers

You can try to use btn-sm, btn-xs and btn-lg classes like this:

.btn-xl {     padding: 10px 20px;     font-size: 20px;     border-radius: 10px; } 

JSFIDDLE DEMO

You can make use of Bootstrap .btn-group-justified css class. Or you can simply add:

.btn-xl {     padding: 10px 20px;     font-size: 20px;     border-radius: 10px;     width:50%;    //Specify your width here } 

JSFIDDLE DEMO

like image 105
Rahul Tripathi Avatar answered Sep 19 '22 04:09

Rahul Tripathi