- This topic has 15 replies, 2 voices, and was last updated 8 years, 2 months ago by Tom.
-
AuthorPosts
-
January 31, 2016 at 10:17 pm #169477Siong Boon Lim
Hi Tom,
I have a search bar located on the top right hand side of the page “Search Store”,
https://www.ioanything.com/I want to change the text color,
and tried locating the css selector using the inspector, but there are nothing controlling the text color which is now displaying as light grey color.Appreciate your help on this.
Thank you.January 31, 2016 at 11:55 pm #169498TomLead DeveloperLead DeveloperHi there,
So first, change it within the search field:
.widget .search-field { color: red; }
Then change it on focus (when you’re typing):
.widget .search-field:focus { color: red; }
Then you need to change the placeholder:
.widget .search-field::-webkit-input-placeholder { color: red; } .widget .search-field:-ms-input-placeholder { color: red; } .widget .search-field:-moz-placeholder { color: red; opacity: 1; } .widget .search-field::-moz-placeholder { color: red; opacity: 1; }
Hope this helps π
- This reply was modified 8 years, 2 months ago by Tom.
February 1, 2016 at 12:55 am #169505Siong Boon LimHi Tom,
I still can’t make it change color.
The text “Search Store” remain light grey in color.All the 5 sets of css code is inserted to the css style file.
I even put the code at the end of the file, still no effect.This is tricky.
I don’t know why.February 1, 2016 at 9:49 am #169638TomLead DeveloperLead DeveloperI’m seeing your only using 3 character values for the colors – can you try using the full 6 character values?
February 1, 2016 at 4:48 pm #169728Siong Boon LimThe 3 char color code is for the rest which is working.
I tried your suggestion using “red”. Exactly the same. but nothing happen.
I have removed it, since it doesn’t change anything.
I also tried editing it from the inspector, also no reaction.February 1, 2016 at 5:34 pm #169732TomLead DeveloperLead DeveloperCan you add the code I provided back even thought it doesn’t do anything? I want to see what’s overriding it.
February 1, 2016 at 5:38 pm #169735Siong Boon LimHi Tom,
I added in your css code.
Same code, I didn’t change the color.Thank you for your help.
February 2, 2016 at 9:19 pm #170071TomLead DeveloperLead DeveloperI’ll check this out once I get back to my desktop (on an iPad next to a sleeping newborn baby right now).
Hoping we’ll be home tomorrow π
February 3, 2016 at 12:08 am #170097Siong Boon LimRest well. Enjoy the moment.
February 4, 2016 at 4:39 pm #170487TomLead DeveloperLead DeveloperDid you manage to fix this? The text in the search bar is red for me.
If you’re not seeing it, try clearing your browser cache and checking again π
February 4, 2016 at 5:02 pm #170499Siong Boon LimNow I can see the red too. But it is when I type the text.
I would like the word “Search Store” to be in another color.
Not the typed letters.
I have tried clearing the cache as your instruction, it still remains as light grey color.February 4, 2016 at 10:00 pm #170536TomLead DeveloperLead DeveloperThat’s odd – it’s red for me.
What browser are you using? The placeholder is tough to change colors, the code I gave you should do it in Chrome/Safari/Opera, Firefox and IE (recent versions).
February 4, 2016 at 11:04 pm #170561Siong Boon LimI am using firefox 44.0.
This means that there is problem with my browser.
I will try other computer.
Thank you for your help.February 4, 2016 at 11:15 pm #170567TomLead DeveloperLead DeveloperJust did a little research on it – try the updated code above π
February 4, 2016 at 11:22 pm #170568Siong Boon LimOh. It works with your updated code above.
I don’t quite understand why, but it works.Thank you very much.
-
AuthorPosts
- You must be logged in to reply to this topic.