Archived topic
Top-bar widget right align on mobile
5 replies · Started by Alf on February 21, 2020
Hi there,
I have a language selector widget placed in the top bar. I have set top bar alignment to "right" in the customizer which works well on desktop. However in mobile view the widget is placed in center, even with same alignment setting.
Is there a way to "force" the widget to always right align even in mobile?
Many thanks for your help!
All the best,
Alf
Hi there,
Try this CSS:
@media (max-width: 768px) {
body .top-bar.top-bar-align-right {
text-align: right;
}
.inside-top-bar {
padding-right: 6px;
}
}
Adding CSS: https://docs.generatepress.com/article/adding-css/
Let me know if this helps :)
Perfect that works! Is there a way I could add a for example 5px right padding to it in that mobile view as well? So to align it with the hamburger icon. Thanks again!
Can you try the edited CSS above?
https://generatepress.com/forums/topic/top-bar-widget-right-align-on-mobile/#post-1173134
Fantastic, thanks for the great support!
Glad I was helpful :)