0

Here I assigned a width of 25% to each button in a line, but since it seems to be adding spacing between them the buttons won't "fit" and one of them goes to the line below.

button {
    width: 25%;
    border: none;
    margin:0;

https://jsfiddle.net/o3L3ofa2/

Any elegant way to fix this without trying percentages like 22% etc?

tyb
  • 4,749
  • 11
  • 31
  • 38
  • 1
    media queries - http://stackoverflow.com/questions/19934647/resize-buttons-responsively-in-bootstrap. in short, if your viewport is X/Y then the media query can adjust your button. –  Apr 29 '17 at 15:56
  • 1
    remove the white space between them. they're inline elements, so spaces/returns in the code will show up between the elements. – Michael Coker Apr 29 '17 at 15:57
  • @MichaelCoker that worked - thank you! – tyb Apr 29 '17 at 16:00

0 Answers0