Archived topic
Inside Navigation Hook, Postion Inserted Block
12 replies · Started by Scott Pringle on September 21, 2022
I have a hook element with HOOK NAME= inside_navigation. The block I am adding appears in front of the right justified primary menu. I was hoping that it would be above the primary menu and also right justified. All my CSS attempts have failed. Any help/suggestions would be appreciated.
https://eoshop.pringletech.com
--
Scott
Hi Scott,
Try after_primary_menu hook instead.
When I change the hook name to after_primary_menu then my block is still in line with the primary menu, but at the end instead.
Are you looking for something like this?
https://www.screencast.com/t/nalTnkcL
1. If so, try add this CSS:
.top-menu {
width: 100%;
order: -1;
}
div#primary-menu {
margin-left: auto;
}
2. Remove the orange background color from the container which contains the buttons, and set the orange background color for the button blocks.
Almost, the block is not justified to the right.
Which block is not justified right?
The top orange button group that is above the primary navigation.
Have you done step 2 here: https://generatepress.com/forums/topic/inside-navigation-hook-postion-inserted-block/#post-2350999
Yes, the css has been added to the customizers additional CSS section.
2. Remove the orange background color from the container which contains the buttons, and set the orange background color for the button blocks.
Have you done this? The CSS is in step 1.
The element block is now shifted to the right. However, when logged in, the block is left justified. Strange, but I can live with this.
Thank you for your help!
You are welcome :)
You can also add this CSS to target the buttons block in the element and make the button blocks same height:
.gb-button-wrapper.gb-button-wrapper-bbbe3fdb {
align-items: unset;
}