June 28, 20188 yr Hi all, I have built a responsive custom WordPress theme with media queries. However, I would like to make it so that the hamburger menu only displays on a mobile device (including tablets). How would my website be able to detect this?
June 28, 20188 yr Um, with responsive you don't need to worry about if it's a mobile device as using media queries will display the hamburger when a screen size is below the set break point. No difference if it's a pc using 800 x 600 or a tablet with the same setting.
June 28, 20188 yr Author Exactly. I would like it to display the Desktop nav if it's a PC, but if a tablet with the same size screen (e.g. iPad Pro) I would like the hamburger. My hamburger drop-downs are only working when tapped on a mobile. They are still hover on a PC.
June 28, 20188 yr I would have a read of this as it covers different hover behaviour for the touchers. In short, I don't think you need to detect device, his examples of scenarios go from using a mouse plugged into an Android tablet to using sticky fat fingers on an iPhone 4
Create an account or sign in to comment