I have a div element that I want to hide when the width of the browser is less than or equal to 1026px. Is this possible to do with the css: @media only scr
@media only scr
This should help:
if(screen.width<1026){//get the screen width //get element form document elem.style.display == 'none'//toggle visibility }
768 px should be enough as well