Site logo

[Resolved] Menu hiding behind part of GP element

Home Forums Support [Resolved] Menu hiding behind part of GP element

Home Forums Support Menu hiding behind part of GP element

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #2446704
    William

    Hi there,

    I noticed the drop down of the primary menu is disappearing behind a container in a GP – is there a way to correct this?

    Kind regards,

    Will

    #2446922
    David
    Staff
    Customer Support

    Hi there,

    can i see that page ?

    #2446928
    William

    Ah sorry David, excuse my tiredness for a Friday! It’s here.

    #2446979
    David
    Staff
    Customer Support

    Oh no apologies needed, i didn’t even know it was friday lol

    Try adding this CSS:

    
    .main-navigation {
        position: relative;
    }
    #2447250
    William

    Thanks a lot David – I assume it’s nothing to do with the z-index then?

    #2448907
    David
    Staff
    Customer Support

    Oh it is very much related to z-index
    All parent level nodes within the body of the document have a default stacking context, including an element has a higher implied z-index then it descending siblings.
    So the Primary Nav should always sit in front of the elements below it.
    And any child node of that element, its stacking context and z-index is relative to its parent.
    For example: a sub-menu inside the nav. Which means the sub-menu should never be able to sit behind another parent level descendent element.
    Unless that child element ( sub-menu ) is absolute positioned, then it “can” get itself in places it shouldn’t.
    By setting the nav to position relative we force the sub-menus stacking context to be relative to the nav.
    Which fixes that anomaly, and makes for a very tricky explanation to read lol

    #2449167
    William

    Gotcha, thanks for explaining it and helping!!

    #2450027
    David
    Staff
    Customer Support

    Glad to be of help – and glad you could understand that – reading it back to myself left me dizzy lol

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.