After generating buttons using my JavaScript code based on contents from a JSON file, I utilized a display grid structure to arrange them with a maximum of 2 buttons per row. However, there seems to be a styling issue as the larger buttons overflow off the screen. How can I ensure that the buttons remain visible and potentially resize as the screen shrinks? Below 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've investigated potential margin issues without any luck. Additionally, I would like to center the container holding the answers. Can someone advise on a strategy for shrinking button sizes while maintaining the visibility of the button labels/text regardless of their size?