I would like to change watermark text and pup-up text on my search bar. I would like to do it with some CCS. I know that it not recommended but I think that this is the fastest way.
I have readen How can I replace text with CSS? and How to use CSS to replace or change text? but my case is more complicated.
I tried:
input.search-field.placeholdit.watermark span{
display:none !important;
}
input.search-field.placeholdit.watermark:after{
content: 'TEXT'!important;
}
And some other combinations with span.screen-reader-text
, search-wrapper
, search-field.placeholdit
. The only thing which I achived was earasing searchbox window.
Search box looks like on image bellow - I would like to change "Search ..." and "Search for:" texts:
Search box code:
<div class="search-wrapper">
<form role="search" method="get" class="search-form" action="my.website.com">
<label>
<span class="screen-reader-text">Search for:</span>
<input type="search" class="search-field placeholdit" value name="s" title="Search for:">
</label>
<input type="submit" class="search-submit" value="Search">
</form>
</div>
If there are better ways to change it, I would like to hear it. Beginnings are rough but I would like to learn how to change webpages properly.