Avatar of Melody Scott
Melody Scott
Flag for United States of America

asked on 

Disable div if screen smaller than 1024px

Hi, please see: http://dev2.magickitchen.com/menu/main_courses.html

user name: pepe, pw: Bob The Builder 45!!

I have some script at the bottom that allows the left menu to be locked in one place while the page scrolls. That works great as long as the screen shows the left menu. On smaller screens, the menu shifts to the top, and I no longer want it to lock, otherwise the page won't scroll at all.

I have this: <style>
@media (max-width: 1024 px) {
     #scroll { display:none !important; }
</style>, but it isn't doing what I want, which is to disable the scrolling div when the screen is smaller. I've attached a screenshot of the code with the relevant parts highlighted.
CSSWeb DevelopmentHTMLBootstrap

Avatar of undefined
Last Comment
Melody Scott

8/22/2022 - Mon