Files
rust_browser/tests/goldens/fixtures/204-table-layout-fixed-colspan-first-row.html
Zachary D. Rowitsch 17e93d867b
All checks were successful
ci / fast (linux) (push) Successful in 7m14s
Implement table-layout: fixed CSS property (CSS 2.1 §17.5.2.1)
Column widths are determined by <col> elements and first-row cells only,
ignoring content in subsequent rows for faster, more predictable layout.
Falls back to auto layout when table has no explicit width.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 06:44:39 -05:00

26 lines
581 B
HTML

<!DOCTYPE html>
<html>
<head>
<style>
body { margin: 0; }
table { border: 1px solid black; width: 400px; table-layout: fixed; border-spacing: 0; }
td { border: 1px solid gray; padding: 5px; }
</style>
</head>
<body>
<!-- colspan=2 in the first row: the spanning cell's width hint must be IGNORED
for fixed layout; both spanned columns fall back to equal distribution. -->
<table>
<tr>
<td colspan="2" style="width: 9000px">Spanning A+B</td>
<td style="width: 100px">C</td>
</tr>
<tr>
<td>X</td>
<td>Y</td>
<td>Z</td>
</tr>
</table>
</body>
</html>