Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!-- quirks -->
<title>Percentage height quirk is just for sizing purposes</title>
<link rel="author" title="Oriol Brufau" href="obrufau@igalia.com">
<link rel="match" href="../css/reference/ref-filled-green-200px-square.html">
<meta name="assert" content="
Due to the quirk, #target resolves `height: 100%` against #grandparent.
However, this is just 'for the purpose of calculating the height',
so `top: 100%` resolves against #parent, and thus behaves as `auto`
">
<style>
#grandparent { height: 200px; width: 200px }
#parent { background: red }
#target { position: relative; height: 100%; top: 100%; background: green }
</style>
<div style="margin: 1em 0">
Test passes if there is a filled green square and <strong>no red</strong>.
</div>
<div id="grandparent">
<div id="parent">
<div id="target"></div>
</div>
</div>