summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/CSS2/normal-flow/containing-block-percent-margin-top.html
blob: 7698f27240ebe2b8f6a98e8c5bfb495ec6b12461 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
<link rel="help" href="https://www.w3.org/TR/CSS22/box.html#propdef-margin-top">
<style>
  #container { overflow:hidden; background:blue; }
  #container > div { margin-top:50%; height:50px; }
</style>
<p>There should be a blue square below.</p>
<div id="container" style="width:456px;" data-expected-width="100" data-expected-height="100">
  <div></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 = "100px";
  checkLayout("#container");
</script>