Hulk
Hulk

Reputation: 34170

Table data display in HTML

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.

Upvotes: 0

Views: 364

Answers (3)

Tom
Tom

Reputation: 30698

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.

Upvotes: 0

Ray
Ray

Reputation: 21905

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

<td nowrap>...</td>

--- or ---

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

<td class="cell">...</td>

Upvotes: 1

Jonathan Julian
Jonathan Julian

Reputation: 12264

Use the css overflow property.

Upvotes: 0

Related Questions