How to Adjust Logo and Menu Positioning in the Vantage Theme
Content
Customizing the header layout is a common request for users of the Vantage theme. Many site owners want to adjust their logo's placement, center their navigation menu, or have both the logo and menu stick to the top of the page when scrolling. This guide compiles the most effective solutions based on community discussions.
Common Logo and Menu Positioning Issues
Based on numerous support threads, users frequently want to:
- Move the logo to the left or right.
- Center the logo above the menu.
- Place the logo inside the navigation menu bar.
- Center the entire navigation menu.
- Make both the logo and menu bar stick to the top on scroll.
Solutions and Code Snippets
1. Centering the Logo
To center a logo that is above the menu, you can use the following CSS. This code works by turning the logo container into a block element and using auto margins to center it.
.site-logo {
display: block;
margin-left: auto;
margin-right: auto;
}
Add this code to your Custom CSS area (in the WordPress Customizer or a plugin like Simple Custom CSS).
2. Centering the Navigation Menu
Centering the menu is a more complex task and often requires a specific CSS technique. The following code has been reported to work for many users.
.main-navigation .menu {
display: table;
margin: auto;
}
For some layouts, a more detailed approach might be necessary:
.menu-primary-container {
float: right;
position: relative;
left: -50%;
text-align: left;
}
#menu-primary {
list-style: none;
position: relative;
left: 50%;
}
#menu-primary li {
float: left;
position: relative;
}
3. Using the "Logo in Menu" Layout
Vantage includes a built-in "Logo in Menu" masthead layout option in the Customizer. However, a known issue is that it constrains the logo's height, often making it appear too small.
To fix this and allow your logo to use its full size, add this CSS:
header#masthead.masthead-logo-in-menu .logo > img {
max-height: none !important;
}
4. Making the Header and Menu Stick Together
A limitation of the Vantage theme is that only the navigation bar can be set to stick to the top on scroll; the masthead (which typically contains the logo) cannot be made sticky by default.
While custom code can make both elements sticky, it is important to test this thoroughly on mobile devices, as it can cause content to be blocked.
Important Notes Before You Begin
- Use a Child Theme: Always add custom CSS to a child theme or a custom CSS plugin. This prevents your changes from being overwritten when the theme updates.
- Clear Your Cache: After making changes, clear your browser and website cache to see the results immediately.
- Test Responsiveness: Any layout change can affect how your site looks on mobile devices. Always check your site on different screen sizes.
These solutions are compiled from successful community support threads. If one method does not work for your specific setup, trying an alternative snippet is often the best approach.
Related Support Threads Support
-
Headings (h1/h2) – vantage themehttps://wordpress.org/support/topic/headings-h1h2-vantage-theme/
-
how to add 2nd company logo/image beside 1st company logohttps://wordpress.org/support/topic/how-to-add-2nd-company-logoimage-beside-1st-company-logo/
-
Centre Logo and Page Titleshttps://wordpress.org/support/topic/centre-logo-and-page-titles/
-
aligning buttonshttps://wordpress.org/support/topic/aligning-buttons-2/
-
Logo not centeredhttps://wordpress.org/support/topic/logo-not-centered-1/
-
Mash head logo in menu bar logo sizehttps://wordpress.org/support/topic/mash-head-logo-in-menu-bar-logo-size/
-
Justify Masthead Menu to the Righthttps://wordpress.org/support/topic/justify-masthead-menu-to-the-right/
-
Logo in Menu – not lining up with menu tabshttps://wordpress.org/support/topic/logo-in-menu-not-lining-up-with-menu-tabs/
-
Button in Masthead changes position on different pageshttps://wordpress.org/support/topic/button-in-masthead-changes-position-on-different-pages/
-
Logo merge with top menuhttps://wordpress.org/support/topic/logo-merge-with-top-menu/
-
How to add a navbar which is right-fixed?https://wordpress.org/support/topic/how-to-add-a-navbar-which-is-right-fixed/
-
Aligning Image Middle / Vertical in Masthead Widgethttps://wordpress.org/support/topic/aligning-image-middle-vertical-in-masthead-widget/
-
swapping position of logo and site headerhttps://wordpress.org/support/topic/swapping-position-of-logo-and-site-header/
-
Center texthttps://wordpress.org/support/topic/center-text-6/
-
Logo Size / Spacing with masthead logo in menu?https://wordpress.org/support/topic/logo-size-spacing-with-masthead-logo-in-menu/
-
Centering the Logohttps://wordpress.org/support/topic/centering-the-logo-2/
-
Header drop-down box not alignedhttps://wordpress.org/support/topic/header-drop-down-box-not-aligned/
-
Menu Navigation Centeredhttps://wordpress.org/support/topic/menu-navigation-centered/
-
LOGO on Menu ?https://wordpress.org/support/topic/logo-on-menu/
-
Horizontal Menu Problemhttps://wordpress.org/support/topic/horizontal-menu-problem/
-
Navigation Bar goes Vertical, Not Horizontalhttps://wordpress.org/support/topic/navigation-bar-goes-vertical-not-horizontal/
-
Menu and logo alignmenthttps://wordpress.org/support/topic/menu-and-logo-alignment/
-
Nav Bar & Logo Alignmenthttps://wordpress.org/support/topic/nav-bar-logo-alignment/
-
Move logo to the lefthttps://wordpress.org/support/topic/move-logo-to-the-left-2/
-
A couple of issues.https://wordpress.org/support/topic/a-couple-of-issues-12/
-
Header / Menu Overlap on just HOME pagehttps://wordpress.org/support/topic/header-menu-overlap-on-just-home-page/
-
navigation centerhttps://wordpress.org/support/topic/navigation-center-1/
-
Need help with masthead layouthttps://wordpress.org/support/topic/need-help-with-masthead-layout/
-
Masthead-Centering non patterning background helphttps://wordpress.org/support/topic/masthead-centering-non-patterning-background-help/
-
Right Align Nav-Barhttps://wordpress.org/support/topic/right-align-nav-bar/
-
Logo Postion for Arabic Language sitehttps://wordpress.org/support/topic/logo-postion-for-arabic-language-site/
-
Center Allign Nav-Barhttps://wordpress.org/support/topic/center-allign-nav-bar/
-
You may also like… is in a strange place on pagehttps://wordpress.org/support/topic/you-may-also-like-is-in-a-strange-place-on-page-2/
-
two navigation bar questionshttps://wordpress.org/support/topic/two-navigation-bar-questions/
-
Moving our company logo to the bottom?https://wordpress.org/support/topic/moving-our-company-logo-to-the-bottom/
-
fix masthead and navigation bar togetherhttps://wordpress.org/support/topic/fix-masthead-and-navigation-bar-together/
-
How to put links at top right on header?https://wordpress.org/support/topic/how-to-put-links-at-top-right-on-header/
-
center nav menuhttps://wordpress.org/support/topic/center-nav-menu-4/
-
How do I havehttps://wordpress.org/support/topic/how-do-i-have/
-
Center Navhttps://wordpress.org/support/topic/center-nav-1/
-
Center Aligning the menuhttps://wordpress.org/support/topic/center-aligning-the-menu/
-
Get 2 differents logo Masthead/Menuhttps://wordpress.org/support/topic/get-2-differents-logo-mastheadmenu/
-
Buttons do not align verticallyhttps://wordpress.org/support/topic/buttons-do-not-align-vertically/
-
How to move logo left?https://wordpress.org/support/topic/how-to-move-logo-left/
-
Masthead Logo paddinghttps://wordpress.org/support/topic/masthead-logo-padding/
-
How to add social media links on the same line as menu?https://wordpress.org/support/topic/how-to-add-social-media-links-on-the-same-line-as-menu/
-
Login and Register in headerhttps://wordpress.org/support/topic/login-and-register-in-header/
-
Change Login and Register after Logged inhttps://wordpress.org/support/topic/change-login-and-register-after-logged-in/
-
adding logo to menuhttps://wordpress.org/support/topic/adding-logo-to-menu/
-
Help with social logos (wanna get them to header)https://wordpress.org/support/topic/help-with-social-logos-wanna-get-them-to-header/
-
border-bottom issue with page-in-headerhttps://wordpress.org/support/topic/border-bottom-issue-with-page-in-header/
-
Centering imageshttps://wordpress.org/support/topic/centering-images-10/
-
How do I center the navigation menu?https://wordpress.org/support/topic/how-do-i-center-the-navigation-menu/
-
Centralise in Mobile viewhttps://wordpress.org/support/topic/centralise-in-mobile-view/