Hey @garyjobshops,
Thanks for reaching out!
You can use the native functionality to hide or show an element/sections on different views. You can check it here:
On the other hand, if you want to use your custom code, you may update it to this one:
@media only screen and (max-width: 1580px) {.x-navbar nav { display: none;}}
Please note that custom CSS code is outside the scope of our support. Issues that might arise from the use of custom CSS code and further enhancements should be directed to a third-party developer or you can avail One where we can answer questions outside of the features of our theme.
Hope that helps.