Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Best Navigation menu, pure CSS, javascript, jQuery etc.

Featured Replies

Hi there, I'm just starting out and am a little bit hazy on the best way to design a nav menu. I'm hearing talk of pure CSS, which sounds simple but these menus look a little basic from what I've seen. So for a design with any credibility should I be using Javascript and JQuery? Or a mixture of all? I want my menu to look stylish and be compatible with mobile devices. Thanks

If you want the menu to just change appearance CSS media queries should be enough.

 

If you want a toggle button to show/hide the menu you will need a little JavaScript function to change the display property of the menu.

 

If you want dropdowns it can be done with CSS :hover but I will recommend JavaScript as hover-dropdowns can cause some problems on touch devices especially if the parent-menu item also is a link.

In that case it has both a hover and (the default) click event attached and a touch device can only trigger one of the events.

You technically dont need any JavaScript. You can use a hidden checkbox with a linked label styled like a toggle button. You can then use the css :checked psudeo along with the adjacent child selector. That said I still prefer to use JS for mobile menu toggling. It's cleaner. I wrote about how to deal with dynamic navigation that works well with touch and mouse based devices http://rbrtsmith.com/2014/12/a-more-robust-dynamic-navigation-system/

Edited by rbrtsmith

  • Author

Thanks a lot guys. I'll toy with a bit of JavaScript then. I'm not really familiar with it so it will be fun learning I'm sure :good::D

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.