servo/tests/ref/table_colspan_fixed_a.html
Patrick Walton 586c12ccc4 layout: Implement border-spacing per CSS 2.1 § 17.6.1 and the legacy
`cellspacing` attribute per HTML5 § 14.3.9.

Table layout code has been refactored to push the spacing down to
rowgroups and rows; this will aid the implementation of
`border-collapse` as well.

This commit also fixes two nasty issues in table layout:

* In fixed layout, extra space would not be divided among columns that
  had auto width but had nonzero minimum width.

* In automatic layout, extra space would be distributed to constrained
  columns as well even if unconstrained columns with percentage equal to
  zero were present.
2015-03-12 12:00:40 -07:00

27 lines
563 B
HTML

<!DOCTYPE html>
<html>
<style>
table {
width: 300px;
table-layout: fixed;
border-spacing: 0;
}
td[colspan="2"] {
background-color: blue;
color: white;
}
td[colspan="3"] {
background-color: green;
color: white;
}
</style>
<body>
<table border=0 cellspacing=0 cellpadding=0>
<tr><td width=100>&nbsp;</td><td width=100>&nbsp;</td><td width=100>&nbsp;</td></tr>
<tr><td colspan=2>&nbsp;</td><td>&nbsp;</td></tr>
<tr><td>&nbsp;</td><td colspan=2>&nbsp;</td></tr>
<tr><td colspan=3>&nbsp;</td></tr>
</table>
</body>
</html>