Problem Summary

Topic listing pages (postlist.tpl) generate measurable CLS from table column recalculation. Web Analytics reports #body_col>table.t_outer shifts of ~0.13–0.16. Local testing on forum pages confirms CLS >0.20 with the worst cluster on table.t_outer.

Affected Template

templates/default/postlist.tpl (and potentially showflat.tpl which also uses .t_outer)

Root Cause

The .t_outer table lacks table-layout: fixed. The header row does not specify column widths consistently with the data rows, forcing the browser into automatic table layout. As the parser discovers more row content, it recalculates column widths. The subject column contains right-floated spans (span.fr.nw.op5 for ratings and status icons) that reflow when column widths change.

Specific mismatches in postlist.tpl header vs. data rows:

Header col 1: no width specified → Data col 1: width:1%
Header col 2: no width specified → Data col 2: width:1%
Header col 3: min-width:60% → Data col 3: no width specified, contains span.fr floats

Fix

Add table-layout: fixed to .t_outer:
.t_outer { table-layout: fixed; }
Or add it inline in tbopen.tpl:
<table class="t_outer" style="width:100%;padding:0;border-spacing:0;table-layout:fixed;">
Ensure the header row defines widths that match the data rows. Add style="width:1%;" to the first two header cells to match the data cells below them.
Consider adding explicit <col> definitions for the topic list table to guarantee stable column sizing regardless of row content.

Files to modify

templates/default/tbopen.tpl (add table-layout:fixed to inline style or CSS class)
templates/default/postlist.tpl (match header widths to data row widths)

After editing, clear compiled template cache:

rm -f templates/compile/*


The Stovebolt Geek
https://www.stovebolt.com/ubbthreads/ubbthreads.php

Server Information
UBB.threads Version 8.0.0
Release 20240826
Server OS Linux
Server Load 0.11
Web Server Apache/2.4.37
PHP Version 8.3.11
MYSQL Version 8.0.39
Database Size 1.82 GB