【发布时间】:2020-04-08 20:25:38
【问题描述】:
我认为这是 CSS 的问题,所以我在 td 中尝试了 overflow:auto、text-overflow:ellipsis 和 display:flex
这是我的 HTML
<div class="box" style="overflow-x: auto; height: 90%">
<div class="box-body">
<table id="applicant_table" class="table table-bordered table-striped">
<tbody>
<?php foreach($app_array as arr) { ?>
<tr>
"<td>" echo $arr->coverletter "</td>"
<?php
}
?>
</tr>
</tbody>
</table>
</div>
</div>
如何显示我的数组的全部内容?
【问题讨论】:
-
这取决于 JavaScript 数据表库。
-
@Barmar 我正在使用 jQuery。我可以拥有什么样的数据表库?
-
阅读 jQuery-Datatables 库的文档,了解如何指定列宽应该灵活而不是固定大小。
-
@Barmar 仍然没有修复它。我用过
autoWidth:false,table.columns.adjust().draw();。有没有更好的?谢谢 -
试试
autoWidth: true
标签: php jquery arrays datatables