gpt4 book ai didi

CSS 表格长文本在表格中断时对齐

转载 作者:行者123 更新时间:2023-11-28 06:07:37 24 4
gpt4 key购买 nike

我想在 freemarker xml 中使我的表的标题文本集中,但这是发生了什么:

enter image description here

我的html和CSS如下:

<table class="itemtable" cellspacing="0">
<thead>
<tr>
<th class='head' align="center" colspan="1"><span class='title_br'>Unbilled Sales Order</span></th>
<th class='head' align="center" colspan="1"><span class='title_br'>Job to Date</span></th>
<th class='head' align="center" colspan="1"><span class='title_br'>Open PO's</span></th>
<th class='head' align="center" colspan="1"><span class='title_br'>Remaining Bdgt. Est. vs. JTD + POs</span></th>
</tr>
</thead>
</table>




table {
font-family: sans-serif;
font-size: 7pt;
margin-top: 10px;
table-layout: fixed;
width: 100%;
}

table.itemtable td {
font-size: 7px;
width: 8%;
}
table.itemtable th.head {
font-size: 6pt;
border-style: solid;
border-color: black;
border-collapse:collapse;
border: 1px solid black;
border-style: solid double solid double ;
}
span.title_br {
font-family: sans-serif;
font-size: 7pt;
font-weight: bold;
text-align: center;
letter-spacing: 1px;
}

最佳答案

您的图像看起来在代码中某处有一个 text-align: justify; 设置。它不在您发布的代码中,但从图像来看它必须在某个地方。

搜索“justify”,如果找到则删除该规则。也许它在更高级别的模板或类似的地方......

关于CSS 表格长文本在表格中断时对齐,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36366773/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com