How do I remove the default styling of this button but keep the icon?

Issue

I need to remove the default styling of this button (The background and border), but any time I try to the CSS does nothing.

Here’s the code:
<button type="submit"> <i class="fa fa-trash" class="trashIcon"></i> </button>

Thanks!

Solution

I suspect that you might have tried to change style of the icon, not the button.

What should work:

.your-class-name {
    background: none;
    border: none;
}
<button class="your-class-name" type="submit"> 
  <i class="fa fa-trash" class="trashIcon"></i> 
</button>

Answered By – Marcin K.

Answer Checked By – David Marino (AngularFixing Volunteer)

Leave a Reply

Your email address will not be published.