Archived topic
sticky logo and navigation alignment
13 replies · Started by Moses on October 31, 2017
Hey, I had a similar problem before and was given this snippet:
.main-navigation.navigation-stick .navigation-logo {
float: right;
}
.nav-aligned-center .main-navigation.navigation-stick {
text-align: left;
}
But It's not working for me this time.
I want my sticky logo to float right, and my sticky navigation to float left. site is RTL
Hi there,
Is the navigation location set to align center?
No. it was set to left,
now I re-added the above snippet and made it centred aligned so you can check it again please
anything?
Oops sorry not sure how this slipped through.
Can you activate the sticky navigation again?
Thanks!
Done
Can you try this method? https://docs.generatepress.com/article/navigation-logo/#navigation-as-header
I believe this is the look you are going for.
Let me know :)
Hey Leo, the floats are still swapped, navigation on the right and logo on the left and I want them exactly the opposite
What if you set the alignment to left? https://docs.generatepress.com/article/navigation-layout/#navigation-alignment
Tried, no change (you can check now it's aligned to the left)
You have this CSS added which is making the logo on the left side:
.main-navigation .site-logo.navigation-logo {
position: absolute;
left: 0;
top: 0;
}
Try right: 0;
I'll check with Tom why the align left isn't working.
1. Add this CSS:
.rtl .main-navigation li {
float: left;
}
2. Remove this CSS you've added:
.main-navigation .site-logo.navigation-logo {
position: absolute;
left: 0;
top: 0;
}
And replace it with this:
.main-navigation .site-logo.navigation-logo {
position: absolute;
right: 0;
top: 0;
}
Thanks tom and leo !
You're welcome!