• Hi,

    What would be the best way to make the menu bar default to the open state on a page by page basis? (i.e. the front page)

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Kathryn Presner

    (@zoonini)

    Hmm. If the menu bar defaults open in Espied it’ll be overlapping your portfolio and looks a bit broken. Are you sure that’s what you want?

    Thread Starter adonnan

    (@adonnan)

    @kathryn Yes that would be the case, however I customized the menu to not be 100% wide on desktop and mobile. Take a look. https://andrewdonnan.com

    sacredpath

    (@sacredpath)

    Automattic Happiness Engineer

    @adonnan, give this a try and see it this doesn’t do it for you.

    .js .sidebar {
        display: block;
        right: 0;
        min-width: 150px;
    }

    sacredpath

    (@sacredpath)

    Automattic Happiness Engineer

    @adonnan, I edited the above and added a minimum width since the menu was starting to hide on the right at small screen sizes.

    Thread Starter adonnan

    (@adonnan)

    Cool. I’m still trying to figure out how to declare it properly to only default to open on a specific page. this isn’t working:

    .page-id-12760 .js .sidebar {
        display: block;
        right: 0;
        min-width: 150px;
    }

    sacredpath

    (@sacredpath)

    Automattic Happiness Engineer

    I was stumped for a minute, but now I see. .js is actually a class set in the HTML opening tag, so we need to rearrange the selector a bit. Give the following a try.

    .js .page-id-12760 .sidebar

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘menu default state – open’ is closed to new replies.