Jump to content

placeholder text colour


jackfrostza

Recommended Posts

How do I change the "Search for Wines" colour

 

 

 

 

 

 

{if $MENU != ''}
    <!-- Menu -->
    <div id="block_top_menu" class="sf-contener clearfix col-lg-12">
        <div class="cat-title">{l s="Menu" mod="blocktopmenu"}</div>
        <ul class="sf-menu clearfix menu-content">
            {$MENU}
            {if $MENU_SEARCH}
                <li class="sf-search noBack" style="float:right">
                    <form id="searchbox" method="get" action="{$link->getPageLink('search')|escape:'html':'UTF-8'}" >
                        <input type="hidden" name="controller" value="search" />
                        <input type="hidden" name="orderby" value="position" />
                        <input type="hidden" name="orderway" value="desc" />
                        <textarea name="search_query" class="search_query form-control" id="search_query_top" placeholder="{l s='Search for Wines' mod='prosearch'}">{$search_query|escape:'htmlall':'UTF-8'|stripslashes}</textarea>

                  </form>
                </li>
            {/if}
        </ul>
    </div>
    <!--/ Menu -->
{/if}

Link to comment
Share on other sites

You can use CSS like the following to style the placeholder text:

::-webkit-input-placeholder { /* Chrome/Opera/Safari */
  color: red;
}
::-moz-placeholder { /* Firefox 19+ */
  color: red;
}
:-ms-input-placeholder { /* IE 10+ */
  color: red;
}
:-moz-placeholder { /* Firefox 18- */
  color: red;
}

Change red to the colour you want. This will style the placeholders throughout the entire site though. If you want to change just the search bar placeholder, you'll need to add #search_query_top before the first : on each line above.

Link to comment
Share on other sites

If you want to change all placeholders throughout your website, put it in themes/<your_theme>/css/global.css. If you've added #search_query_top before to change just the search block, put it in themes/<your_theme>/css/modules/blocksearch/blocksearch.css.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...