To incorporate a button border, you can include the button_border
class - border-0
, especially if utilizing bootstrap.
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/js/all.min.js"></script>
<button type='button' id='{0}' onClick='delete_row(this.id)' style ='font-size:17px' class='btn btn-outline-danger border-0' data-toggle='modal' data-target='#exampleModalCenter'><i class='far fa-trash-alt '></i></button>
Alternatively, you have the option to keep only the btn
class and define your desired color.
.red-button [class*=fa] {
color: #dc3545;
}
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/js/all.min.js"></script>
<button type='button' id='{0}' onClick='delete_row(this.id)' style='font-size:17px' class='btn red-button' data-toggle='modal' data-target='#exampleModalCenter'><i class='far fa-trash-alt '></i></button>
If preferred, another approach could involve using a different element such as span
.
.red-button [class*=fa] {
color: #dc3545;
}
.red-button {
cursor: pointer;
}
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/js/all.min.js"></script>
<span id='{0}' onClick='delete_row(this.id)' style='font-size:17px' class='red-button' data-toggle='modal' data-target='#exampleModalCenter'><i class='far fa-trash-alt '></i></span>
The options are plenty for customization.