Files
rust_browser/tests/goldens/fixtures/206-table-layout-fixed-all-explicit.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

28 lines
716 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>
<!-- All columns have explicit first-row widths (100px + 100px + 100px = 300px).
Because their sum does not equal the available table width (398px after borders),
the implementation scales them proportionally to fill the table. -->
<table>
<tr>
<td style="width: 100px">A</td>
<td style="width: 100px">B</td>
<td style="width: 100px">C</td>
</tr>
<tr>
<td>Row 2 content is irrelevant in fixed layout</td>
<td>D</td>
<td>E</td>
</tr>
</table>
</body>
</html>