Styling an instant on page search

Hello webflow community.

I’ve used an input field to create an instant search. But i’ve ran into some issues.

  1. I used an input field in a form block to create the current styling. I gave it a class then applied the same class to my embed element. However I could not work out how to control the focused style, as it is still has the default thick blue outline. (See image below)

  2. I would also like to add a clear (x) icon to replace the search icon once the user starts to type.

3.Lastly the instant search doesn’t seem to work on mobile and i’m not sure why.

Share link:
Published link:

If anyone could offer any tips I would grateful.

Thank you

You could just add a bit of custom code to style the element within the html embed or in the custom code head section of the page:

    .page-search:focus { 
          /* your styles here */

Thanks @sam-g
That done the job! :slight_smile:

For anyone else experiencing a similar issue this is the code i used;

.instant-search:focus {
outline: none;
background-color: #ededed;

Did you fix instant search not working on mobile?