I dont need any text in my search button but if I leave it blank it add "Search" as default
Simple and easy way is set font-size to 1px in button css class. Like this:
or try to set font-size to 0px. It should to help you.
The thing is I have an icon in a class that should show a magnifying glass, which if I use inspect in google and remove the "search" text works.
I need to be able to change the webpart so that you don't need a text value
Go to the webpart and change the properties and make the property not required. There is a good chance there is a default set in code though.
I think easiest way is what Alexander Kontsevoy said. Set font to 1px. One more trick you can use is text-indent: -9999px;
Please, sign in to be able to submit a new answer.