I want all columns (<td> </td>) in <table> </table> to be of equal length, how to do this?

How to do it using CSS or HTML?

 <table class="banner"><tr><td>If you need many results, then post your task as piecework here. You only need to pay qualified results.
  </td>
 <td>Make money by doing piecework</td></tr>
 <tr><td><a href="publish.php">POST PIECEWORK FOR FREE</a><br/></td><td></td></tr></table>
+5
source share
7 answers

Here you should use the property table-layout...

table { table-layout: fixed; }
table td { overflow: hidden; }
+7
source

Use CSS:

td{overflow:hidden;width:200px;}
+2
source

CSS . . CSS- CSS Styling Tables w3schools.

td {
    width:200px;
}

<td style="width:200px;">

, HTML, colgroup, :

<colgroup>
    <col width="200px" />
</colgroup>

.

+1

:

table { width:100% }
td { width:20% }

( , 5 . , 33%, 2 50% ..

0

(CSS , ) ( - 100%). .

0

width td. , , . :

<table class="equal_width_columns">
    <tr><td>one</td><td>onetwothree</td></tr>
</table>

<table> <!-- just a regular table -->
    <tr><td>one</td><td>onetwothree</td></tr>
</table>

css :

table.equal_width_colums * td { width: 300px; }
0

. , .

http://freachable.net/2007/11/02/AutomaticEqualWidthColumnsInHTMLTables.aspx

Give the cells a very small width. Cells will scale to fit the available width.

table tr td { width:5%; }
0
source

All Articles