diff --git a/src/components/site-header/hy-desktop-menu-links/hy-desktop-menu-links.tsx b/src/components/site-header/hy-desktop-menu-links/hy-desktop-menu-links.tsx index 51b48e7d5ef026126ab9383706413afa0d287deb..3b0dcc67385f0ac6e49245804a4fbb15e5e97c62 100644 --- a/src/components/site-header/hy-desktop-menu-links/hy-desktop-menu-links.tsx +++ b/src/components/site-header/hy-desktop-menu-links/hy-desktop-menu-links.tsx @@ -146,8 +146,7 @@ export class HyDesktopMenuLinks { this.showBackdropShadow('open', shadowTop); // Position submenu block under the activated top menu item. - let activeButtonRect = activeMenuItem.getBoundingClientRect(); - const menuPanelLeftPosition = activeButtonRect.left - this._submenuLeftMargin; + const menuPanelLeftPosition = activeMenuItem.offsetLeft - this._submenuLeftMargin; activeMenuItemSibling.style.paddingLeft = `${menuPanelLeftPosition}px`; // Position shortcuts block. diff --git a/src/components/site-header/site-header.scss b/src/components/site-header/site-header.scss index d7e2b1346c5e5530dfffce0330f32e769add2567..26292ff750eaf43096feda54e00f2b5b17ebd925 100644 --- a/src/components/site-header/site-header.scss +++ b/src/components/site-header/site-header.scss @@ -23,7 +23,8 @@ position: fixed; right: 0; transform: translateY(0) translateZ(0); - width: 100%; + //width: 100%; + width: inherit; //?? } &--sticky-hidden { top: 0; @@ -166,6 +167,7 @@ background-color: rgba(0, 0, 0, 0.4); transition: background-color 300ms; visibility: visible; + width: inherit; //?? z-index: 99; } }