首页 > 解决方案 > 数据表中重叠的列标题文本

问题描述

我使用数据表来显示数据,表有 14 列

但我在显示表头数据时遇到问题。它重叠而不是显示在两行

在此处输入图像描述

我这样创建表

<table id="tbl" class="table" cellspacing="0" width="100%" style="word-wrap:break-word;
              table-layout: fixed;">
    <thead>
        <tr>
           <th>Column Name</th>
        </tr>
    </thead>
</table>

我怎样才能在两行中做到这一点

标签: datatables

解决方案


<table id="tbl" class="table" cellspacing="0" width="100%" style="word-wrap:break-word;
              table-layout: fixed;">
    <thead>
        <tr>
           <th style="word-wrap: break-word;">Column Name</th>
        </tr>
    </thead>
</table>

溢出:隐藏应该可以解决问题;-)


推荐阅读