Quoted By:
I'm making a (not) Discord, and I want CSS / Javascript help with the layout.
I can't get the mobile version to work.
Here's how I want the whole thing to function:
In desktop mode (width > 1000px) both friend list and main window should be visible (figure 1).
The view needs to collapse into just the main window when viewport width is < 1000 px (figure 2).
There's a button that you click and it removes the main window and pops up the friend list instead (figure 3). You absolutely can't have both visible at the same time.
I can sort of do this, but if I do it with JS by changing div element visibility from flex to none and back, this setting persists when window is stretched back to desktop mode. So, a div that was made invisible stays invisible.
What's the best way to execute this?