简体   繁体   中英

Table data display in HTML

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

ie, 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.

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

<td nowrap>...</td>

--- or ---

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

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

使用css overflow属性。

对您的<td>标签使用百分比宽度和高度,无论它们内部的内容如何,​​它们都将相对于彼此进行调整。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM