1
I have a table with stock buttons but, as they are inside the tag the result is different than expected. OBS: I need you to direct to a new route. How to fix it. I want the result on the right side.
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet"/>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.3.1/css/all.css" rel="stylesheet"/>
<div class="container">
<table class="table table-white">
<tbody>
<tr>
<td><a href="/deletar/{{dataValues.id}}"><button type="button" class="btn btn-danger"><i class="far fa-trash-alt"></i></a></td>
</a></td>
<td><button type="button" class="btn btn-danger"><i class="far fa-trash-alt"></i></button></td>
</tr>
</tbody>
</table>
</div>
I’m using nodejs. When I click the button I want to go for a new route, but the buttons are ugly. Run the code, so you can see the difference in the buttons. The first boot works but is ugly, the second is cool but does not direct to the route I want.
– Bernardo Lopes
Yes, it is because in one this using a link tag and in the other button only, you can use only so <button type="button" class="btn btn-Danger float-right"><i class="far fa-Trash-alt"></i></button> or even in your css adjust the property of a to it stay None a{text-Decoration: None;}
– Jorge Kania
How to go to this route " /delete/{dataValues.id}}" when clicking the button?
– Bernardo Lopes