How to distribute column spacing of a responsive table equally?

Asked

Viewed 287 times

-4

How can I distribute column spacing equally from a table using CSS?

Ex:

<table>
  <tr>
    <td>Nome</td>
    <td>Email</td>
    <td>Telefone</td>
  <tr>
</table>

1 answer

-1

You can use the property table-layout: fixed

table {
  width: 100%;
  table-layout: fixed;
}

table td {
  border: 1px solid #000;
}
<table>
  <tr>
    <td>Nome</td>
    <td>Email</td>
    <td>Telefone</td>
    <tr>
</table>

  • 1

    I think you can elaborate a lot more on that answer by putting examples of it working.

  • Put an example in your question as well as in the answer.

  • Sample code added as requested.

Browser other questions tagged

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