Archived topic
How do I adjust the search bar when I click equal the menu items length?
11 replies · Started by Quan on December 12, 2020
Hello,
My search bar is the same length as main-navigation.
I have read the post:
https://docs.generatepress.com/article/navigation-search/
"This option adds a search icon (magnifying glass) to your navigation bar. When you click it, a semi-transparent search bar covers your menu items and allows you to enter a term to search your site."
How do I adjust the search bar when I click equal the menu items length?
Hi there,
Any chance you can link us to the site in question?
You can use the private information field.
Let me know :)
I already know about that, but I mean I want the search bar length to be auto by the length of the menu items (when it is longer or shorter).
That's not possible as you are using the navigation as a header option:
https://docs.generatepress.com/article/navigation-as-a-header/
You could try recreating that header by deactivating that option and use navigation location to float right:
https://docs.generatepress.com/article/navigation-location/
Then the navigation width will be equal to the width of the navigation itself.
This site is using the method:
https://woorkup.com/
Thank you very much!
No problem :)
I used it but I have a CLS problem.
The main issue seems to be from the content part which is all coming from Thrive.
Maybe it's coming from that animated headline?
I tested the blog page and it was fine:
https://gtmetrix.com/reports/phamdinhquan.net/reA89EBV/
Thank you, I understood the reason. Have a nice week!
No problem :)