views:

79

answers:

3

In the following table: how to adjust the height and width automatically for the table.

i.e, if the data is more it should display all the data else present data in a fashionable manner

<table id="mytable"> 
  <tr>
    <td>more data.............................................................................</td>
    <td>a</td>
  </tr>
</table>

In the nothing should be wrapped wither in case of large chunks of data or small chunks of data.

Thanks.

A: 

Use the css overflow property.

Jonathan Julian
+1  A: 

Use 'nowrap' in the tag or in a style:

<td nowrap>...</td>

--- or ---

<style>
  .cell {
    white-space:nowrap;
  }
</style>

<td class="cell">...</td>
Ray
A: 

Use percentage widths and heights for your <td> tags and they will be adjusted relative to each other regardless of the content that's inside them.

Tom