To achieve this, you can use CSS Flexbox which makes it easy to arrange elements in a row or column. Here's an example code:
HTML:
index.tsx165 chars8 lines
CSS:
index.tsx134 chars11 lines
In this code, the container has a flex-direction of column which allows the boxes to stack vertically. If you want the boxes to stack horizontally, you can change the flex-direction to row.
The margin-bottom property is used to create a gap between the boxes. You can adjust the value of this property to fit your requirements.
With this code, when the screen size is reduced, the boxes will stack vertically instead of horizontally.
gistlibby LogSnag