The dropdown menu
 

The dropdown menu

When developing menu systems you need to understand the difference between a dropdown and an accordian.

I discuss the difference between the two on my main website. However, the discussion was not easy to find and it is one of the more eclectic subjects of my design. I took an example from the W3C Schools website that demonstrates the difference.

The W3C website explains:

In this example, we have added an accordion and a dropdown menu inside the side navigation. Click on both to understand how they differ from each other. The accordion will push down the content, while the dropdown lays over the content.

I have an example of this code on a page on my main website. The code is also used in the menus on some of the pages on this website. However, I have removed the accordian from the side/overlay menu on this page.

The menu on this page

Depending on what device you are viewing this page the menu will be different.

On a desktop or other large display you will see the "Overlay - Side Menu on the left of the screen. When viewed on a mobile device you will see a menu button that looks like a conventional dropdown.

In addition, on a large display there is a "dropdown" on the top bar to the right of the left side menu. This is an "expandable dropdown", my name for it. All the menus are based on CSS classes from the W3C.css Framework. This is for convenience, the dropdowns can be coded just using standard CSS.

Top

The difference and when they are used

The W3C explaination above describes what these menu options do. I explain here when and why they are used.

The challenge

The challenge is to deterime what sort of dropdown you require. This depends on where you are wanting to implement a menu.

The code

The W3.css Framework classes are:

  • w3-dropdown-hover
  • w3-dropdown-content, w3-bar-block and w3-bar-item
  • and for the Accordian dropdown - w3-bar-item w3-button

Site design by Tempusfugit Web Design -