I need to display 3 tables, each with a width of 300px, on a webpage. These tables can be collapsed or visible. My goal is to arrange them so that if only one table is visible, it appears in the center of the page (centrally aligned). Additionally, the tables should adjust their positions based on the size of the screen. For instance, if the screen size is 1300px, all three tables should be displayed horizontally. If the screen size is 700px, two tables should be side by side and the third below them.
What I've attempted:
- I've tried wrapping the tables in a container and centering it, but that did not achieve the desired result.
- I've also experimented with placing the tables inside another table, but I struggled to position them correctly based on the screen size (resulting in a horizontal scroll when the screen size decreased, which is not ideal).