In my project, I am working on showcasing a list of 'input' and 'textarea' elements within a flex box arrangement. Each element needs to have a width set to 45% of the flex box.
One challenging issue that arises is the following: I am seeking assistance in ensuring that if two items of the same type are present, they should be displayed next to each other on the same line; whereas if they are of different types, they should be displayed on separate lines.
For instance:
Two 'input' items side by side will appear on the same line
https://i.sstatic.net/vU4PQ.png
When an 'input' and 'textarea' are placed adjacent to each other, they will be displayed on separate lines