AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Notifications
Clear all

[Closed] Search Form BG Color

5 Posts
2 Users
0 Reactions
1,162 Views
Posts: 11
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@donnongt)
Active Member
Joined: 6 years ago
[#15108]

How can I change the background color of the text input field in the forum toolbar without also changing the background under the fa-search icon, when the text field is hidden? Any ideas? Thanks.

 

 

 Screen Shot 2020 11 09 at 3.38.26 PM

4 Replies
Posts: 11
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@donnongt)
Active Member
Joined: 6 years ago

I actually want to change every text input field background color and I haven't found any one place to do so. I have implemented half a dozen css changes that have changed the background colors in most areas, but not the search input field. It's inherited color is white. Does anyone know where that field color is originally set, or was it never defined and just defaults to white? Thanks again.


Posts: 11
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@donnongt)
Active Member
Joined: 6 years ago

Nevermind. I figured it out.

.wpf-search input[type="text"]:focus

Posts: 11
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@donnongt)
Active Member
Joined: 6 years ago

OK, another question:

I would like to chage the Fa search icon color when the search form is in use. I used ':focus' to target the search form text input field when it is open, but that isn't working for the FA icon.

Does anyone have any idea how I can set the FA icon color differently, depending on whether the search form is visible or not? I appreciate the guidance.


1 Reply
Alvina
Moderator
(@alvina)
Joined: 7 years ago

Member
Posts: 1857
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@donnongt,

Please try the following JS code:

jQuery( ".wpf-search" ).click(function() {
jQuery("#wpforo #wpforo-wrap .wpf-search i").css("color", "#00070b");
});

Please note the red marked value can be changed.

The code should be added in the current active theme JS files.

Here is an instruction on "How to Add Javascript  Without Breaking Your WordPress Site":  https://www.collectiveray.com/add-javascript-to-wordpress


Share: