Fixed button size

0
Hi all, I have several buttons and would like to set them all at the same size. Any suggestions how to do that? Cheers
asked
2 answers
3

Depends on what your goal is. The suggestion made by Ockert is a nice one, especially is you want to have the buttons scale up/down dynamically within a responsive layout.

If you would want to tackle all buttons to a fixed width, the way to go would be with something like

.btn {
     width: 75px;
}

The above would set the width to 75px. The problem there is that if the caption of your button is wider, the button display gets messed up. So what you often also see is that a base width is set, and any button that needs to be wider can do just that. Something like this would achieve that:

.btn {
     min-width: 75px;
}

If you're just targeting some specific buttons, I think the easiest way would be to apply the above, but with a special class that you add to the buttons that need to be affected. So if you add a btnWide class to a button for example, you can target buttons with that class using

.btnWide {
         width: 75px;
}
answered
0

You could add a table/container(divs),or that new responsive widget thing, control that by percentile/col-width, and set the buttons inside to have 100% width

answered