You can put your buttons in a container with the property of
.class { display: inline-block; }
inline block will make the elements have the minimal width around your button and also be a block element at the same time, or you can give your buttons the inline-block property as well
@lantech19446 yes because your buttons consisted of two elements an image and text, if it was only the images, you could do it with
.myImageButton { display: block; } /* not inline-block that was my fault */
inline-block is for alignment in a row without a flexbox, forgot that