View Full Version : table width question

07-11-2002, 04:39 AM
how do you determine the width of a table in pixels? can you do it with javascript?

for example:

<tr> waaadddddupppp </tr>
<tr> yoooooooooooo </tr>


The width of the table above is set according to the width of the row text How do you determine the width of the table in pixels?

Thanks Dude.

07-11-2002, 05:26 AM
<table border="0" cellpadding="0" cellspacing="0" width="745" summary="745 pixel wide table">
<td width="345">345 pixel wide cell</td>
<td width="400">400 pixel wide cell</td>
<td colspan="2" width="745" height="120">745px wide, 120px high cell spanning two columns</td>

07-11-2002, 05:54 AM

<table id="myTable".......>

07-11-2002, 04:35 PM
Your table code is missing something....here's an overview of what most of the table tags do:

<table> - defines that you are starting a table
<tr> - defines a new row in your table
<td> - defines a new column in your table
</td> - ends the column
</tr> - ends the row
</table> - ends the table

To define the width of a table in pixels, just use
<table width="100 "> and change the number in red to your specifications.