html - Table width border cellspacing cellpadding all 0 in HTML5 error validation -
i need use tables data changing html5 , new css. problem html5 validators giving me validation problems tables
here table
<table width="600" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="200" align="left" valign="top"> td 1 must 200px width </td> <td width="200" align="left" valign="top"> td 2 must 200px width </td> <td width="200" align="left" valign="top"> td 3 must 200px width </td> </tr> </table>
i tried css cannot make work. need have table 600px width, 1 tr , 3 td, each td must 200px (600px / 3 = 200 each )
tested adding style="align:left; valign:top;" not work. neither cellspacing or cellpadding. need no cellspacing no cellpadding no border don´t know how achieve ...
any ideas?
looked info online see new way of css add collapse or cannot understand how without spacing or padding
you avoid attributes with
table { border-collapse: collapse; width: 600px; } table td { vertical-align: top; text-align: left }
and write simpler markup
<table> <tr> <td>td 1 must 200px width </td> <td>td 2 must 200px width </td> <td>td 3 must 200px width </td> </tr> </table>
example: http://codepen.io/anon/pen/lvvemw (border inserted clarity purpose)
as can see every cell automatically 200px wide
Comments
Post a Comment