The main header menu has drop-down menus of sub-pages and then those also have sub-pages which automatically position themselves to the right of the drop-down menu. However, the furthest to the right go off the page and I need to change this so that the sub pages in the menu show to the left of the drop-down.
For window border detection and automatic submenu placement to avoid offscreen appearance scripting is required.
However, the menu is designed to be as light as possible (in browser resource usage) and as such it has almost no scripting applied to it.
To avoid submenus appearing offscreen I can only suggest to either rearrange your submenus or try to keep the submenu labels length at a minimum.