Site logo

[Resolved] Drop shadow on header

Home Forums Support [Resolved] Drop shadow on header

Home Forums Support Drop shadow on header

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #566703
    Helen

    Hello support,
    I’m going to update the site http://www.kerrycricket.com to GeneratePress Pro and Elementor as it’s running on an old free theme no longer supported. The club like the drop shadow under the white site header as it exists and I’m wondering how I can duplicate that effect on the GP header please?

    Is it slso possible to apply a drop shadow to the drop-down pages on the main navigation bar?
    Many thanks for your help,
    Helen

    #566914
    Leo
    Staff
    Customer Support

    Hi there,

    That header can be done with this method:
    https://docs.generatepress.com/article/navigation-logo/#navigation-as-header

    Then this CSS should add the shadows:

    .main-navigation {
        -webkit-box-shadow: 10px 10px 5px 0px rgba(0,0,0,0.75);
        -moz-box-shadow: 10px 10px 5px 0px rgba(0,0,0,0.75);
        box-shadow: 10px 10px 5px 0px rgba(0,0,0,0.75);
    }
    
    .main-navigation ul ul {
        -webkit-box-shadow: 10px 10px 5px 0px rgba(0,0,0,0.75);
        -moz-box-shadow: 10px 10px 5px 0px rgba(0,0,0,0.75);
        box-shadow: 10px 10px 5px 0px rgba(0,0,0,0.75);
    }

    You can fine tune it here: https://www.cssmatic.com/box-shadow

    Let me know.

    #567152
    Helen

    Hi Leo,
    Many thanks for your quick reply and assistance. I’m not very familiar with adding css, do I add that code into simple css or somewhere else please?
    Thanks again,
    Helen

    #567426
    Leo
    Staff
    Customer Support
    #567598
    Helen

    That’s great Leo,
    Many thanks

    #567735
    Leo
    Staff
    Customer Support

    No problem 🙂

    #1137789
    Rickard

    Hello!

    The solution above works, but it only shows when you are at the very top of the page.

    I am using a sticky header and when I scroll down the shadow doesn’t show anymore.

    Is it possible to add shadow to a sticky header?

    #1137990
    David
    Staff
    Customer Support

    Hi there,

    try this instead:

    .main-navigation, .sticky-enabled .main-navigation.is_stuck {
        -webkit-box-shadow: 10px 10px 5px 0px rgba(0,0,0,0.75);
        -moz-box-shadow: 10px 10px 5px 0px rgba(0,0,0,0.75);
        box-shadow: 10px 10px 5px 0px rgba(0,0,0,0.75);
    }
    
    .main-navigation ul ul {
        -webkit-box-shadow: 10px 10px 5px 0px rgba(0,0,0,0.75);
        -moz-box-shadow: 10px 10px 5px 0px rgba(0,0,0,0.75);
        box-shadow: 10px 10px 5px 0px rgba(0,0,0,0.75);
    }
    #1137999
    Rickard

    That worked perfect, thank you!

    #1138012
    David
    Staff
    Customer Support

    You’re welcome

    #1173644
    Rickard

    Hello again!

    Is it possible to add this shadow also to the top of the footer bar?

    #1173734
    David
    Staff
    Customer Support

    Maybe try this:

    .site-info {
        -webkit-box-shadow: 0 -10px 5px 0px rgba(0,0,0,0.75);
        -moz-box-shadow: 0 -10px 5px 0px rgba(0,0,0,0.75);
        box-shadow: 0px -10px 5px 0px rgba(0, 0, 0, 0.75);
    }
    #1173875
    Rickard

    Thank you! 🙂

    #1175100
    David
    Staff
    Customer Support

    Glad to be of help

    #1340193
    Marc

    You guys here at the support staff are just perfect!
    Honestly, one of the best support forums I have ever used (compared to Enfold’s, OceanWP’s and Astra’s).

    Thumbs up, and keep up the good work!

Viewing 15 posts - 1 through 15 (of 18 total)
  • The topic ‘Drop shadow on header’ is closed to new replies.