Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-sizing/percentage-height-replaced-content-in-auto-cb.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<p>Test passes if there is a green square below.</p>
<body onload="checkLayout('img')">
<div>
<img id="img" data-expected-height="100" style="width: 100px; height: 100%">
</div>
<script>
img.src = "/css/support/60x60-green.png?" + Math.random();
img.offsetTop;
</script>
</body>