Hiding a panel can be done using an onclick event on a w3-button:
Click on the X to close this panel.