From Newsgroup: alt.html
Dale, 2026-10-28 07:51:
[...]> on w3.org there is a menu icon on the upper right corner that I
would
like to design for all of my pages
https://www.w3.org/
The way how the menu is displayed, depends on the width of the viewport.
So on mobile devices you will have a menu in the top right corner while
desktop systems will have a list of drop down menus on top next to each
other.
This is also called "responsive design" - using CSS media queries you
can define which rules apply depending on the properties of the current
browser view.
See more about this here:
<
https://www.w3schools.com/css/css_rwd_mediaqueries.asp>
In addition browsers nowadays support a "popover" API which allows to
build popover menus without JavaScript. The idea is, that you tell the
browser which element is used to open and close the menu and which
element contains the menu itself. The browser will then completely
handle the menu on its own without any need for JavaScript.
See more about this here:
<
https://developer.mozilla.org/en-US/docs/Web/API/Popover_API>
And you can also use CSS to display or hide elements if the visible
parent element touched by the mouse. This is how the drop down menus are implemented on my website <
https://arnowelzel.de> - so these also work
when JavaScript is disabled, since it is only CSS.
--
Arno Welzel
https://arnowelzel.de
--- Synchronet 3.22a-Linux NewsLink 1.2