Site logo

Archived topic

sub-menu box-shadow

7 replies · Started by Fabien on July 9, 2020

Viewing posts 1–8 of 8

Hi,

I am trying to append the existing box-shadow applied to the sub-menu but I have the following issue : the box-shadow overlap with the masthead (at the top).

I am trying to achieve something similar to : https://www.convertflow.com/blog

Thanks

Hi there,

that site has a dedicated element to sit above the Sub Menu to block out the shadow.

Not sure about this but you could try this CSS:

nav .main-nav .mega-menu>ul {
    padding-top: 132px !important;
    top: -50px;
    z-index: -1;
}

.inside-header .secondary-navigation,
.inside-header .site-logo {
    z-index: 1000;
}

Hi David,

Thanks it does work ! But I am loosing my bottom-border on the masthead.... Any idea on how to fix this ?

Hmm... try adding your border with this CSS:

.inside-header {
    position: relative;
}
.inside-header:before {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    border-bottom: 1px solid #d1d7dc;
    pointer-events: none;
}

Thanks David !

I've actually found a way in the mean time, using negative spread :

@media (min-width: 769px)
nav .main-nav .mega-menu>ul {
    position: absolute;
    width: 100%;
    left: 0!important;
    box-shadow: 0 18px 20px -13px rgba(21,21,21,.12);
    padding: 20px 0;
    display: flex;
    margin-top: 1px;
}

Haha of course - massively over thought that :)

Glad you got it resolved.

Same as ;-)

:)

This archived topic is closed to new replies.