简体   繁体   English

HTML中的表格数据显示

[英]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: 在标签或样式中使用“ nowrap”:

<td nowrap>...</td>

--- or --- - - 要么 - -

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

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

使用css overflow属性。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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