summaryrefslogtreecommitdiffstats
path: root/layout/reftests/margin-collapsing/block-percent-2-dyn.html
blob: 92673375ecc09ffe27771acee2f447dcfb352fa4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<style type="text/css">
#parent1 {
 width: 200px;
}
#block1 {
 height: 50px;
 margin-bottom: 20%;
 background-color: green;
}
#parent2 {
 width: 200px;
}
#block2 {
 height: 50px;
 margin-top: 10%;
 background-color: green;
}
</style>
<script type="text/javascript">
function test() {
 document.getElementById('parent2').style.width = '500px';
 document.documentElement.removeAttribute('class');
}
document.addEventListener('MozReftestInvalidate', test);
</script>
</head>
<body>
<div id="parent1">
 <div id="block1"></div>
</div>
<div id="parent2">
 <div id="block2"></div>
</div>
</body>
</html>