Archived topic
Navigation and top bar questions
25 replies · Started by Harris on August 14, 2017
I was playing arround with the top bar.
Its fine now.
When I try to center all 4 elements in mobile, the whole container stucks left.
The content alignment doesn't seem to be proper too (maybe they carry some padding)
Thanks
Harris
Looks like you decided to hide that in mobile?
No. Just tested it as a least solution :) . Just brought it back
Looks like you missed the margin-right: auto; before.
I've added in here for completeness: https://generatepress.com/forums/topic/navigation-and-top-bar-questions/#post-366607
Thanks! Now container is centered.
Is there something we can do in order to better center the content?
Thanks
Harris
It's not quite centered because of the padding added to the elements.
You would have to remove them for mobile. For example, the left padding on the phone icon should be removed for mobile:
@media (max-width: 768px) {
.top-bar-icon-1 {
padding-left: 0 !important;
}
.top-bar-icon-2 {
padding-right: 0 !important;
}
}
Can you have a last look?
I removed the padding but still something seems wrong especially on the FB icon side.
And two last questions:
1. Is it posibble to have a copyright bar without having a footer?
2. The text used in the top bar (actually just one string saying about business hours). If I add it in the themes po and .mo files and translate it will it show properly in English?
Or will I have to use an if statement in the hook code in order to seperate the languages?
Thanks
Harris
You have right padding added to the Facebook icon. Edited the code above: https://generatepress.com/forums/topic/navigation-and-top-bar-questions/page/2/#post-366758
1. Not sure what you mean? what are are you trying to add? Maybe try the footer bar widget area?
2. I'll confirm with Tom
You'd likely need to use a plugin like WPML or Polylang to translate static text like that.
Or you could use PHP and the get_locale() function to check the current language.
Hello Leo,
I had removed the right padding from the FB icon. I guess setting it as important did the job.
Thanks a lot for your assistance!
Tom thanks for your help too.
Thanks
Harris
Glad we could help!