Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: Clear search input - color

Arthur Turik free asked 3 years ago


Is there a way I can change the color of the icon as well make cursor pointer when hover?enter image description here


Michał Duszak staff answered 3 years ago


This is a webkit feature. You can style it using input[type="search"]::-webkit-search-cancel-button. Here's code I found that can change clear button's appearence to one of font awesome icon.

https://mdbootstrap.com/snippets/standard/m-duszak/3085591#css-tab-view


Arthur Turik free commented 3 years ago

Great, thanks! I've also added the property:

input[type="search"]::-webkit-search-cancel-button:hover { cursor: pointer; }



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Standard
  • MDB Version: MDB5 3.5.1
  • Device: all
  • Browser: all
  • OS: all
  • Provided sample code: No
  • Provided link: No