- This topic has 9 replies, 2 voices, and was last updated 4 years, 10 months ago by
David.
-
AuthorPosts
-
May 22, 2021 at 9:53 pm #1794396
Greg
I’m trying to merge the primary navigation and header (which I’ve created using an Element). I can’t get the nav to overlay on the header image. I’d also like the nav to be on the left and the logo on the right.
This is what I’m aiming for. https://cln.sh/r3wv4Q
What am I missing?
Thank you
May 23, 2021 at 3:31 am #1794570David
StaffCustomer SupportHi there,
1. Add this CSS to reverse the logo / menu layout:
.main-navigation .inside-navigation { flex-direction: row-reverse; } .main-navigation.nav-align-right .navigation-branding { margin-right: unset; margin-left: auto; }2. For the merged header – create a header element:
https://docs.generatepress.com/article/header-element-overview/
You’re not going to add anything to the Page Hero tab.
On the Site Header tab, simply enable the Merge with content option.
This will provide options to change the site header and navigation colors – which will only apply to the areas you set in the Elements Display Rules … this allows you to override the Customizer Settings for those specific pages.May 23, 2021 at 7:06 am #1794952Greg
The first item worked perfectly. Thank you.
I’m confused on the second item. I have a header element already which is using the page’s featured image as the hero background. Do I create a second header element, or is this in place of the one I’m using now?
May 23, 2021 at 9:11 am #1795087David
StaffCustomer SupportIf you already are using a Header Element then you simply need to enable the Site Header > Merge with Content option and adjust the site header / navigation colors to suit on your existing Element.
May 23, 2021 at 12:19 pm #1795183Greg
I have Merge with Content set to “merge” and I still have the page background showing behind the navigation. https://cln.sh/jBYewS
Should I have “Use navigation as header” set? I’ve removed all the custom CSS I’ve put in, but no luck. I think I’ve tried all the combinations except the correct one!
May 23, 2021 at 4:24 pm #1795308David
StaffCustomer SupportDo you have any other hook elements as you have an additional DIV element with a class of
site-wrapperbeing inserted into the code, which is breaking the merged header?May 23, 2021 at 9:24 pm #1795406Greg
I added a containing wrapper, using the steps here: https://docs.generatepress.com/article/adding-a-container-wrapper/ in order to to try and add a background to the whole site (to obtain the thin line stripes shown here: https://cln.sh/r3wv4Q).
I’ve removed those two elements and the navigation and header are now merging.
Is there a way to achieve this background over the whole site? If I add it to the body tag I don’t see it.
May 24, 2021 at 1:54 am #1795622David
StaffCustomer SupportAah ok – sorry i didn’t spot it earlier.
You could try keeping that method, accept on the first hook that uses:
before_headerchange the priority to0
That should fix the issue…May 24, 2021 at 12:13 pm #1796489Greg
That did the trick.
Thank you very much David!
May 25, 2021 at 2:17 am #1797028David
StaffCustomer SupportGlad to be of help
-
AuthorPosts
- You must be logged in to reply to this topic.