The Menus you are viewing are for Desktop Displays
Phone Menu
Tablet Menu
This menu was added to provide extra menu options to my design based on the Nature Portfolio template from the W3 Schools website.
It is an additional "complication" to the Overlay Menu design.
The menu is a topbar (w3-top class) with w3-bar that are both containers for a w3-dropdown-hover class element.
The w3-dropdown-hover class element contains w3-bar-item w3-button class elements
Analysis of the code
This has been seperated from the Overlay menu code analysis as that page was complicated enough!
Example from Admin Page:
<div class="w3-top w3-hide-small ">
<div class="w3-bar w3-pale-green w3-bottombar w3-border-grey" style="margin:0px -16px;">
<span class="w3-bar-item"><b>Administration</b></span>
<div class="w3-dropdown-hover">
<button class="w3-button w3-pale-green">More <i class="fa fa-caret-down"></i></button>
<div class="w3-dropdown-content w3-bar-block w3-pale-blue w3-card-4 w3-normal w3-animate-zoom">
<a href="#" class="w3-bar-item w3-button w3-hide-large" onclick="w3_open()">Menu</a>
<a href="spf_3.html" class="w3-bar-item w3-button" title="new">Spam Suppression</a>
No expandable menus on a mobile phone
The expandable drop-downs will not display on moble phone. This is by design as I have determined that it does not make sense as the operation of these menus is best suited to a larger display. While the expandable drop-downs will work on a touch screen, a tablet for example, a phone user is more likely to be confused by such a menu.
Menu colours
A further enhancement (not yet fully implemented as it could be too confusing) is to make items on the expadable dropdown different colours depending on their destination. By default the button background colour is blue, this is retained for links to other pages on the website. This is overwritten for links to sections of the current page which are w3-pale-yellow.
Adding a link to the top button
As I was playing around with the new design I thought it might be a good idea to make the buttons on the top menu actually have targets.
Originally the top buttons were just of the class "w3-dropdown-hover", the buttons within this class were "w3-dropdown-content" with no anchor tag. Adding an anchor tag to this button and setting the text-decoration to none gives the required target.
On this page the target is this section. On the Index page the targets will be the main pages for the sections.
On other pages other than the index page the "More" button can be linked to this page (and section) or the main page associated with the page.
A question would be how does this work on a touch screen?
Although I did get this to work it generated
a validation error when pages were
validated
The links are being removed from this button.