I think I miss something because when the window is smaller than 800 the #header is still hidden so I think I need to add an 'else' condition or something. And also how can I add a bunch of css code only when the windows is bigger than 800 or it's better to use css media queries ? Thanks
f I resize the window below 800 the header is still invisible. What is the problem ? I can't use css media queries because I want to execute other functions when the windows is bigger than 800.
I know it's better with media queries but the problem is that I want to display the #header only when a button is clicked only when the browser width is greater than 800px because I do not want to alter the css properties for mobile devices
I have this code :
I think I miss something because when the window is smaller than 800 the #header is still hidden so I think I need to add an 'else' condition or something.
And also how can I add a bunch of css code only when the windows is bigger than 800 or it's better to use css media queries ?
Thanks
Something like this:
which I want to execute only when the window is bigger than 1200
f I resize the window below 800 the header is still invisible. What is the problem ? I can't use css media queries because I want to execute other functions when the windows is bigger than 800.
Also, Senff is right, I highly suggest you find a way to do this with media queries rather.