Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/CSS2/normal-flow/containing-block-percent-padding-top.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
<style>
#container > div { padding-top:10%; width:100px; height:50px; background:blue; }
</style>
<p>There should be a blue square below.</p>
<div id="container" style="width:123px;">
<div data-expected-width="100" data-expected-height="100"></div>
</div>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<script>
document.body.offsetTop;
document.getElementById("container").style.width = "500px";
checkLayout("#container");
</script>