April 10, 201610 yr I use a really simple jQuery dropdown for a menu on a small screen. It's triggered by a media query. Someone has asked if it can push the content down rather than layer over the top. It sounds simple but I'm not good enough a developer to work out how to do it. You can try it here: testblog.co.uk/. Reduce the browser window or take a look on your phone. I thinks it's a css thing not a jquery thing. Or if there is a better way to do this (ideally without using jQuery) that would be icing on the cake Edited April 10, 201610 yr by fisicx
April 10, 201610 yr I only had a very quick look, but try changing the ul element to position:relative instead of absolute. Edited April 10, 201610 yr by rhubarblover
April 10, 201610 yr The default position:static or position relative will push other static or relative elements down unless you are using floats. Fiddle: https://jsfiddle.net/Nillervision/wq6L4v2g/
April 10, 201610 yr Author Thanks to you both. Making it relative was the answer. It so pleasing when it's a simple solution.
April 11, 201610 yr I started with my browser window open full. When I shrank it, the mobile menu was fine but when I enlarged it again there was no menu shown. Refreshing gave the menu back but the same problem occurs.
April 11, 201610 yr Author However, you would normally only see the drop down on small screens so this isn't a major issue. But thanks for the observation.
Create an account or sign in to comment