Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<title>CSS stretch(): the intrinsic size contribution of a table</title>
<link rel="match" href="../reference/ref-filled-green-100px-square.xht" />
<meta name="assert" content="A table with a fixed stretch() width contributes its argument to its container's intrinsic size, margins included, in both table layouts.">
<style>
#reference-overlapped-red {
position: absolute;
background-color: red;
width: 100px;
height: 100px;
z-index: -1;
}
.container {
width: max-content;
background: green;
}
table {
width: stretch(100px);
margin-right: 50px;
height: 50px;
border-spacing: 0;
}
td {
padding: 0;
}
</style>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div id="reference-overlapped-red"></div>
<div class="container"><table><tr><td></td></tr></table></div>
<div class="container"><table style="table-layout: fixed;"><tr><td></td></tr></table></div>