- This topic has 13 replies, 3 voices, and was last updated 6 years ago by
Tom.
-
AuthorPosts
-
November 16, 2017 at 6:31 am #425909
Margot
Hi!
I’m having trouble with my search box which is displaying to the right of my navigation bar. I want it to drop down like the rest of my subnavigation drop downs. Any adice on how to style this would be wonderful. Thank you!
November 16, 2017 at 9:53 pm #426447Tom
Lead DeveloperLead DeveloperFirst you’ll want to remove this CSS:
input { position: absolute; opacity: 0; z-index: -1; }
Then you could do something like this:
form.search-form.navigation-search { max-width: 200px; top: 45px; z-index: 10; border: 1px solid #DDD; border-top: 0; }
November 17, 2017 at 7:15 am #426823Margot
That’s exactly what I was looking to do. One quick question, when the bar navigation bar becomes sticky, the search box shifts to the right, any way to change this?
Thank you for all of your help!
November 17, 2017 at 3:03 pm #427120Tom
Lead DeveloperLead DeveloperAny chance you can remove and add my CSS recommendations above? I’m not seeing them added yet.
November 18, 2017 at 10:32 am #427638Margot
Yes! Sorry, I was working locally but I updated it on the server. I also noticed that I set my mobile breakpoint to 1000px wide via the code you suggested on Github but the transition is strange with the hamburger icon going left first before it snaps right. Should I start a new topic about that?
November 18, 2017 at 2:27 pm #427745Leo
StaffCustomer SupportJust to double check, this is the code you’ve used to change the breakpoint?
https://gist.github.com/generatepress/282078076cd8631c17717d5b8640c043November 18, 2017 at 4:10 pm #427780Margot
You know what… it appears I had an outdated one. That one fixed the hamburger icon, but I’m still running into issues with the sticky instance of the search box. My apologies for not seeing that updated code. That was my oversight.
November 18, 2017 at 7:24 pm #427866Leo
StaffCustomer SupportCan you edit Tom’s code to this:
@media (min-width:769px) { form.search-form.navigation-search { max-width: 200px; top: 45px; z-index: 10; border: 1px solid #DDD; border-top: 0; } }
November 19, 2017 at 7:36 am #428169Margot
Hi Leo, it’s been updated but there’s still that shift happening. Not sure if that was supposed to fix it?
November 19, 2017 at 9:40 am #428254Tom
Lead DeveloperLead DeveloperYou have padding applied to the outer navigation element when not stuck, and then to the inner navigation element when stuck. If you choose one or the other (inner is better), the shift should disappear.
November 19, 2017 at 12:35 pm #428384Margot
Hi Tom, I’m having trouble locating the selector for the outer/inner navigation element you mentioned. If you could just let me know the names of those selectors, I can make the edits. Thank so much for your help and patience!
November 19, 2017 at 7:20 pm #428558Tom
Lead DeveloperLead DeveloperIt should be this:
nav#sticky-navigation .inside-navigation
The other one with padding is:
nav#site-navigation
November 20, 2017 at 10:27 am #429159Margot
Perfect! Thank you again!!
November 20, 2017 at 4:12 pm #429394Tom
Lead DeveloperLead DeveloperYou’re welcome 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.