How to create a link spacing from the same cell of a table?

Asked

Viewed 31 times

-1

The cell in my table should display the redirect link to SELECT, UPDATE and DELETE in the same cell, but everything is together and I wanted to know how to create a space between the links.

  • Expected exit
SELECT UPDATE DELETE
  • Current exit
SELECTUPDATEDELETE
  • Code
echo '<td>'."<a href='../crud/select_itens_compra.php'>SELECT</a>"."<a href='../crud/update_itens_compra.php'>UPDATE</a>"."<a href='../crud/delete_itens_compra.php'>DELETE</a>".'</td>';
  • Cara pq vc does not use CSS to solve this?

2 answers

1


Putting a space in front of each works, see the code below:

echo '<td>'."<a href='../crud/select_itens_compra.php'>SELECT</a> "."<a href='../crud/update_itens_compra.php'>UPDATE</a> "."<a href='../crud/delete_itens_compra.php'>DELETE</a>".'</td>';

If you want to add more than one space, just add &nbsp; for each space you want to add.

echo '<td>'."<a href='../crud/select_itens_compra.php'>SELECT</a>&nbsp;"."<a href='../crud/update_itens_compra.php'>UPDATE</a>&nbsp;"."<a href='../crud/delete_itens_compra.php'>DELETE</a>".'</td>';
  • I understand, I just realized that the problem the solution was simple, thank you.

1

td{padding:0 15px;}
<table>
  <tr><td>SELECT</td><td>UPDATE</td><td>DELETE</td></tr>
</table>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.