mirror of
https://github.com/servo/servo.git
synced 2025-06-17 04:44:28 +00:00
`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.
27 lines
563 B
HTML
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> </td><td width=100> </td><td width=100> </td></tr>
|
|
<tr><td colspan=2> </td><td> </td></tr>
|
|
<tr><td> </td><td colspan=2> </td></tr>
|
|
<tr><td colspan=3> </td></tr>
|
|
</table>
|
|
</body>
|
|
</html>
|
|
|