Change color of text "Search" in Search Bar
Asked by EJ Hunyadi:

There is text within the search box that says, "Search." We need to change the color of that (and not the color of the text once you start typing). How can this be accomplished? None of the attributes in the View Color Scheme Settings section changes this default behavior.


Answers:
author: Jiri Hronik
body: Color Scheme does not have an option for this but you can add a custom stylesheet in Administration \> Global Stylesheet (https://your-confluence-url/confluence/admin/viewstylesheet.action).

To change placeholder color of the search box, use this with your choice of colour:

```
#quick-search-query::-webkit-input-placeholder { /* Edge */
    color: yellow;
}

#quick-search-query:-ms-input-placeholder { /* Internet Explorer 10-11 */
    color: yellow;
}

#quick-search-query::placeholder {
    color: yellow;
}
```

Note that the global stylesheet change will not apply while you're in Administration. Navigate to e.g. Confluence Dashboard to verify your change.

More info about how to use the CSS selector can be found at <https://developer.mozilla.org/en-US/docs/Web/CSS/::placeholder>

comments: author: EJ Hunyadi
body: [@Jiri Hronik](/t5/user/viewprofilepage/user-id/49474) THIS WORKS!!! Thank you so much!


author: Casper Hjorth Christensen
body: Hi [Jiri Hronik](https://community.atlassian.com/t5/user/viewprofilepage/user-id/49474)

Would you have something similar for Jira?

currently we have the following inserted

*** ** * ** ***

```
<!-- SEARCH BAR CHANGE START -->
<!-- workaround for https://jira.atlassian.com/browse/JRASERVER-38890 -->
<!-- Searchbar recoloring -->
<style>
#quickSearchInput {
border-radius: 5em;
background: rgb(75,100,85);
color: rgb(241,240,237);
}

#quickSearchInput::-webkit-input-placeholder {
color: rgb(241,240,237);
}
#quickSearchInput:-moz-placeholder {
/#quickSearchInput FF 4-18 #quickSearchInput/
color: rgb(241,240,237);
}
#quickSearchInput::-moz-placeholder {
/#quickSearchInput FF 19+ #quickSearchInput/
color: rgb(241,240,237);
}
#quickSearchInput:-ms-input-placeholder {
/#quickSearchInput IE 10+ #quickSearchInput/
color: rgb(241,240,237);
}

.aui-header .aui-quicksearch::after{
color: rgb(241,240,237);
}
</style>
<!-- SEARCH BAR CHANGE END -->
```

*** ** * ** ***

However it doesnt change the color of the static opague "search" text, only background and the text we insert


author: Jiri Hronik
body: Hi [@Casper Hjorth Christensen](/t5/user/viewprofilepage/user-id/3546764)

You should be able to achieve the placeholder text styling in Jira using the same solution.

It depends on the browser you use. For instance this should work in majority of current browsers including Chrome, Firefox, MS Edge, Safari and others:

```
#quickSearchInput::placeholder {
    color: rgb(241,240,237);
}
```

Your example has various vendor prefixes like -moz- or -webkit-input-, those are mostly not needed any more unless your users are on older browser versions.

The compatibility and possible required prefixes for the \`::placeholder\` pseudo-element are described in the table in <https://developer.mozilla.org/en-US/docs/Web/CSS/::placeholder#browser_compatibility> - click on the "..." to see details on which version of the browser required prefixes.

Hope it helps!


Tags: confluence-server

server