Archived topic
Search bar on mobile hides text
3 replies · Started by Marko on September 3, 2021
Hi, I've included my website in private info as I don't wish to share it.
But when you hit my search bar on Desktop/Tablet it works fine and you can see the text.
If you go mobile, it creates an element on top of the search and the text doesn't appear until you get about 30 or so characters in.
How should I go about fixing this? I've tried to search the forum but nothing stuck out.
Thanks.
Hi there,
with that kind of layout i would use this CSS, which will move the search field below the header when opened:
@media(max-width: 768px) {
.navigation-search {
top: 100%;
}
}
And the use the PHP Snippet provided here to add a Placeholder text:
https://docs.generatepress.com/article/generate_navigation_search_output/#add-a-placeholder
Thanks David, that worked perfectly.
Glad to hear that!