- This topic has 13 replies, 2 voices, and was last updated 10 years, 3 months ago by
Tom.
-
AuthorPosts
-
April 12, 2016 at 6:24 am #186175
David
Hi there,
another css question…
Anyone know how-to edit the (GP standard) search bar css in the main navigation?For example the background-color, color and opacity.
I’m trying to adjust ‘.navigation .search-field’, ‘.navigation-search’ and ‘.navigation .search-field’.
Feel a bit stupid for not being able to find this, but perhaps someone has the answer.
Warm greetings,
David
April 12, 2016 at 6:32 am #186177David
Hold on, I might be able to sort it out myself.
‘.main-navigation li.search-item’ seems to be the right name for this style.
April 12, 2016 at 7:18 am #186187David
I was wrong, I thought ‘.main-navigation .search-field’ would do the trick.
Any help is much appreciated.
April 12, 2016 at 10:11 am #186244Tom
Lead DeveloperLead DeveloperHi David,
Give this a try:
.navigation-search input[type="search"], .navigation-search input[type="search"]:active { /* Your CSS */ }April 12, 2016 at 10:39 am #186259David
Thanks a lot Tom,
I tried to see if that works, but nothing happens. I’m not using any cache plugins and everything refreshes on the fly here, but I will try and make sure it’s not just from my side, by checking other browsers and mobile first. So far it doesn’t seem to affect my style.
David
April 12, 2016 at 1:25 pm #186306Tom
Lead DeveloperLead DeveloperWhat’s the CSS you’re adding?
April 12, 2016 at 7:28 pm #186363David
I’m testing with:
background: #000;
color: #fff;background-color: #000;
color: #fff;Also tried with adding ‘!important’, but nothing happens
April 12, 2016 at 10:55 pm #186389Tom
Lead DeveloperLead DeveloperCan you link me to your site?
April 13, 2016 at 4:33 am #186466David
Ha Tom, I woke up and now it works =)
One thing though, the reason why I am still not using it at the moment; the ‘yellow’ and ‘grey’ color in the search drop-down has the same colors as you can see on your generatepress site. It’s propably a default somewhere, but that’s the part I really need to be able to edit to have it match the style of my own site. Would be great if thats possible to change because its a great and slick search bar that fits your theme perfectly!
I hope you understand what I mean =)
David
April 13, 2016 at 10:47 am #186586Tom
Lead DeveloperLead DeveloperYellow and grey? Do you have a screenshot of that?
Maybe it’s the browser defaults for search forms?
April 13, 2016 at 11:03 am #186597David
Hi Tom, perhaps it is indeed an issue with browser default, haven’t thought of that!
Here is a
.David
April 13, 2016 at 11:11 pm #186680Tom
Lead DeveloperLead DeveloperAh, the answer here might help: http://stackoverflow.com/questions/2920306/google-chrome-form-autofill-and-its-yellow-background
April 18, 2016 at 12:51 am #187598David
Thx again!
April 18, 2016 at 9:35 am #187691Tom
Lead DeveloperLead DeveloperYou’re welcome 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.