I am currently working on fitting a series of elements into a panel, organizing them in rows of three. Here is how I have it set up:
https://i.sstatic.net/DSd7v.png
These elements are supposed to adjust their size based on the screen width. Even though the parent element has a class of flex
and the child elements have classes of flex-grow
, they are not resizing according to the screen width and I can't seem to figure out why. Below is my code snippet:
<React.Fragment>
<div className="flex">
<className="flex flex-grow items-center justify-center w-20 h-8 mx-1 rounded-md border border-black-16 font-medium"/>
<className="flex flex-grow items-center justify-center w-20 h-8 mx-1 rounded-md border border-black-16 font-medium"/>
<className="flex flex-grow items-center justify-center w-20 h-8 mx-1 rounded-md border border-black-16 font-medium"/>
</div>
</React.Fragment>