My code looks like this:
<div class="row">
<div class="col-xs-4">
<a class="btn btn-default btn-block" href="#">1</a>
</div>
<div class="col-xs-4">
<a class="btn btn-default btn-block" href="#">2</a>
</div>
<div class="col-xs-4">
<a class="btn btn-default btn-block" href="#">3</a>
</div>
</div>
This gives me 3 buttons across which is what I want. What I would like to do is make the buttons taller. If at all possible I'd prefer not to specify heights in pixels so that it can scale to different screen sizes better. Could I perhaps specify the height as a ratio (of the width) or a percentage of screen height?
Thanks in advance.
You can very easily change button size by adding btn-lg or btn-sm class to it. These classes modify the button's padding and also the font size and the CSS border radius.
How do I get my bootstrap buttons the same size or width ? Use btn-block, (other optional elements below are: btn-lg for large and btn-primary for blue primary buttons. Use col-sm-4 for narrow and col-sm-12 or entire row for full length buttons.
Use the . disabled class in Bootstrap to disable a button.
The simple & best solution would be to add top and bottom padding.
.btn-block {
padding: 10% 0;
/* define values in pixels / Percentage or em. whatever suits
your requirements */
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With