This is my code and it's horizontal on desktop screen and on phone it's vertical and x button(closebtn) is only on phone displayed and closes the menu bar. How do I automatically display it again, after resizing the page to desktop size?
function oty() {
document.getElementById("tab").style.display = "none";
}
<div class="icon-bar" id="tab">
<button class="closebtn" onclick="oty()">X</button>
<button class="tablink">Home</button>
<button class="tablink">News</button>
<button class="tablink">Contact</button>
<button class="tablink">About</button>
</div>