单元格文本未换行(html表)

时间:2019-03-19 13:23:42

标签: html css thymeleaf

首先,我将向您展示atm的显示方式:

Image

如您所见,单元格的最大宽度正在工作,但是文本没有被换行,而是从单元格溢出。

这是我在表格中设置的CSS:

border-spacing: 0 5px;
table-layout: fixed;
word-wrap:break-word;

这是我为特定单元格设置的css:

text-align: center;
font-weight: bold;
max-width: 100px;

1 个答案:

答案 0 :(得分:0)

修复了将其添加到单元格的问题:

white-space: normal;