After successfully implementing a custom alert box to hide the header with JavaScript, I encountered an issue when trying to use it on different browsers and Android devices. The alert box appeared misplaced on the page and was too big for certain Android devices. Is there a way to adjust the alert box using CSS or another JavaScript script so that it appears in the center and works properly across various browsers? I found the code for the alert box from the following source:
I would appreciate any suggestions on how to modify this code reference.