ECSide标签<ec:table>表格对不齐问题处理
现象如下图

处理方式如下
<ec:table styleClass="dynamic-table"> /* 为表格添加如下样式 */</ec:table><style>
.dynamic-table {table-layout: fixed !important; /* 关键:防止列宽自适应破坏布局 */width: 100% !important;border-collapse: collapse !important;margin: 0 auto; /* 居中显示 */white-space: normal !important; /* 确保子元素可换行 */
}.dynamic-table th,
.dynamic-table td {border: 1px solid #ddd !important; /* 统一边框 */padding: 8px !important; /* 内边距一致 */text-align: center !important; /* 文本居中 */word-wrap: break-word !important; /* 长文本换行 */overflow-wrap: break-word !important; /* 现代浏览器优先 */max-width: 100% !important; /* 强制内容最大宽度不超过单元格 */text-wrap-mode: wrap;
}
</style>处理后效果如下

