• Hi all,

    How to change background color of search field in storefront theme? I want to set the background color of search field to black, like www.remarpro.com.

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter raymondhcw

    (@raymondhcw)

    The url of my website is
    https://104.199.133.150/en/products-2/

    Thanks!

    Try this code in your child theme’s stylesheet:

    input[type="search"],
    input[type="search"]:focus {
    	background-color: black;
    	color: white;
    }

    Using this code will also change the search field in your sidebar, above “Product Categories”, “Eco-Terrarium” and “Greenmist”. If that’s not what you want, try this code instead:

    .site-header input[type="search"],
    .site-header input[type="search"]:focus {
    	background-color: black;
    	color: white;
    }
    Thread Starter raymondhcw

    (@raymondhcw)

    Thanks Stephen!

    It works!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Change background color of search field in storefront’ is closed to new replies.