• neverthejetsetter

    (@neverthejetsetter)


    Hello, I hope everyone is well.

    I’m curious if there’s a way to change the orientation of the Close “X” button on the Dropdown menu? I would like to move it to the Top Right. It would also be nice to have an option to change the size of the button as well since it’s a little small and hard to see.

    Any help (even a little CSS for repositioning), would be great.

    Thank you.

Viewing 1 replies (of 1 total)
  • Thread Starter neverthejetsetter

    (@neverthejetsetter)

    By the way, I’m using the Twenty Twenty-Five in WordPress Studio. Everything is plain, fresh WordPress.

    Upon inspection of the Close “X” button, I located the following CSS:

    .wp-block-ollie-mega-menu__menu-container .menu-container__close-button {
    align-items: center;
    backdrop-filter: blur(16px) saturate(180%);
    background-color: hsla(0,0%,100%,.729);
    border: none;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    opacity: 0;
    padding: 4px;
    position: absolute;
    right: var(--wp--preset--spacing--medium);
    text-align: center;
    top: var(--wp--preset--spacing--medium);
    transition: opacity .2s ease;
    z-index: 100;
    }

    It seems –wp–preset–spacing–medium “is not set”. So the Close “X” button is actually hanging out in the lower left of the Dropdown.

    So I simply added some custom CSS:

    .wp-block-ollie-mega-menu__menu-container .menu-container__close-button {
    right: 25px;
    top: 25px;
    }

    But we can also manually define it:

    :root {
    --wp--preset--spacing--medium: var(--wp--preset--spacing--50);
    }

    And that seems to have done the trick. Now the Close button is in the top right.

    I realize that I could update theme.json. But for now this is good. I’m just trying to make sure this will work for the time being. However, having a positioning option within the Ollie Menu Designer would be nice as well.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.