I have a very specific request regarding the user experience. I want to display four links within a container, positioned next to each other in one row with a vertical line separating them.
For example:
Link one | Link two | Link three | Link four
This layout works when all the links fit within the container. However, if the screen size decreases and the links no longer fit, I would like to switch to a layout with 2 rows and 2 columns, with a horizontal divider between the rows. Additionally, the number of links is variable, so if there are only three links, the third link should extend across the bottom row.
For example:
Link one | Link two
Link three | Link four
Or
Link one | Link two
Link three
I am looking to achieve this behavior without relying on JavaScript, if possible. Ideally, I would like to utilize Flexbox or Bootstrap. Is this possible?