- This topic has 9 replies, 2 voices, and was last updated 3 years, 2 months ago by
David.
-
AuthorPosts
-
February 17, 2023 at 8:46 am #2537037
Philip
I wanted a full width top bar with a logo all the way to the left, with a search bar in the center and social icons to the right (since that’s the only way it seems to have a search bar in the menu).
I added a Top Bar widget. Set
width = fullANDInner Width = fullANDAlignment = Center. Padding is just set to 10.However, upon doing that, all 3 widgets are crammed in the middle. I since then removed logo, but it’s the same.
February 17, 2023 at 9:07 am #2537063David
StaffCustomer SupportHi there,
if the top bar is Logo , search, social icons.
where would the navigation menu go? Would it be below this top bar ?Let me know.
February 17, 2023 at 9:15 am #2537069Philip
Yes, I will keep a menu that will go below the top bar.
February 17, 2023 at 9:25 am #2537085David
StaffCustomer SupportIn that case, do this:
1. remove the items from the Top Bar widget area, and place them in the Header Widget.
2. in Customizer > Layout > Header set its Containers to Full Width.
3. in Customizer > Layout > Primary Navigation, set its Location to Below HeaderOnce thats done let me know, as it will require a little CSS to center the search bar.
February 17, 2023 at 9:47 am #2537106Philip
Ok, I just did that, but now the widgets are sort of stacked up on top of each other. Should I place them in a container?
February 17, 2023 at 10:00 am #2537123David
StaffCustomer SupportAdd this CSS to fix that and center the search widget:
.header-widget { width: 100%; display: flex; align-items: center; } .header-widget .widget_search { margin: auto; flex-basis: 60%; } #masthead { position: sticky; top: 0; z-index: 10000; }February 17, 2023 at 10:04 am #2537128Philip
Looks better – thanks! But two more things would make it perfect:
1. The search widget is still contained or narrow. Ideally layout would be more like 20% / 60% / 20%
2. Can I make the now header sticky and the navigation not sticky? (ie. the navigation is hides when I scroll down)?February 17, 2023 at 10:23 am #2537151David
StaffCustomer SupportI updated the CSS above above to do that.
And you can then disable the sticky nav in the customizerFebruary 17, 2023 at 10:33 am #2537167Philip
Perfect! Thanks so much!
February 17, 2023 at 10:40 am #2537171David
StaffCustomer SupportYou’re welcome
-
AuthorPosts
- You must be logged in to reply to this topic.