Hi there, we have a site with a navbar and a central logo within it with links either side, but using the guides it’s completely off centre and I can’t work out for the life of me why any ideas?
You can not align logo to the center like this (for now your logo is part of the list)
Absolute position
The easiest way is to give your logo absoulte position. See this stackoverflow:
.navbar {
position: relative;
}
.brand {
position: absolute;
left: 50%;
margin-left: -50px !important; /* 50% of your logo width */
display: block;
}
Remember this issue:
NOTE:
This is notresponsive approach (If you write very long <a> names and/or a lot of links your layout will look broken - but for desktop it should work + This is not 100% elegant - i added manually “margin-left” to “lifestyle” link (remember to remove this margin on tablet/mobile) + dont use %width for the logo in this case
Solution in your code:
First you add endless “style salad” (flex and styles) to the core nav - my solution not change this “salad”
ONE famous trick: Create 2 UL (two lists with two wrappers) [list one - align to left][center logo][list two - align to right] but you can not to this on webflow :) https://getuikit.com/docs/navbar#centered-logo
// or by flexbox but again without extra wrapper is little hard - if you really want try to find codepen/jsfiddle