mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 21:37:35 +00:00
LibWeb: Make cell percentage widths relative to table
Cell percentage widths are relative to table width, not containing block width. If the table width is auto, there isn't a normative specification, only a brief mention that the user agent should try to meet it. As a starting point, we increase the width of the table such that it's sufficient to cover min-width of cells with a percentage width. This matches the behavior of other browsers, at least for simple cases.
This commit is contained in:
parent
50d6b1ba19
commit
4596d41291
3 changed files with 72 additions and 2 deletions
|
@ -0,0 +1,21 @@
|
|||
<style>
|
||||
table {
|
||||
border: 1px solid;
|
||||
border-collapse: collapse;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
td {
|
||||
border: 1px solid;
|
||||
}
|
||||
</style>
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="width: 20%;">A</td>
|
||||
<td style="width: 60%;">B</td>
|
||||
<td style="width: 20%;">C</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
Loading…
Add table
Add a link
Reference in a new issue