My JavaScript code has generated buttons based on contents in a JSON file. Using the display grid structure, I have managed to get it into a format with a max of 2 buttons per row. However, after I did that, there seems to be a styling issue as the bigger buttons go off the screen. How do I make it so that as the screen shrinks the buttons are still visible but potentially smaller. Here is my CSS code:
.answers{
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-rows: 0px 0px
grid-column-gap: 10px;
grid-template-rows: auto;
text-align: center;
grid-auto-flow: row;
overflow: visible;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
I have tried seeing if there is a margin issue but there isn't. As well as this, I would like to centered the container which holds the answer to the middle. Could anyone suggest a method forward of shrinking the button size but still being able to see the label/text within, whatever the size.