How to force the maximum width of the table?

2

How can I set the width to be occupied by the table? forcing it to do a line break and continue when it reaches that maximum width?

    
asked by anonymous 27.09.2015 / 01:40

1 answer

2

Of course, if you want to go straight to HTML:

    <table class = "tabela" style = "max-width:100px;">
      <tr>
        <td>teste de tamanho máximo da largura de uma tabela
        </td>
      </tr>
    </table>

Ma Ideally, you have style referencing the tabela class (in this example you give the name you want, or you can use id to identify this specific element) into a separate CSS file.     

27.09.2015 / 02:56