summaryrefslogtreecommitdiffstats
path: root/layout/reftests/forms/fieldset/abs-pos-child-sizing-ref.html
blob: 405cfaf0a9d90a0e36fbfce557ea0b3213f7c4fb (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<!DOCTYPE HTML>
<html><head>
    <meta charset="utf-8">
    <title>Testcase for bug 971653</title>
    <style type="text/css">
        html,body {
            color:black; background-color:white; font-size:16px; padding:0; margin:0;
        }

div {
    position: absolute;
    background: rgba(0,255,0,0.5);
    top:0; bottom:0;
    left:0; right:0;
    z-index: 0;
}
c {
    display: block;
    background: blue;
    height:100%;
}

legend { height: 24px; }

fieldset {
    position: absolute;
    border: 2px green solid;
    width: 100px;
    height: 100px;
    margin-bottom:40px;
}

#t1,#t3 { padding: 3px 5px 7px 11px; }
#t2,#t4 { padding: 0; }

#t1 div, #t3 div {
    /* same numbers as padding above */
    left: -11px; right: -5px;
    top:  -3px;  bottom:-7px;
}

#t2 { top: 120px; }
#t3 { top: 240px; }
#t4 { top: 360px; }

x {
    position: absolute;
    width:100px;
    height:100px;
}
#t1 x, #t2 x {
    height:78px; /* compensate for legend */
}
    </style>
</head>
<body>


<fieldset id="t1">
    <legend>legend</legend>
    <x><div></div><c></c></x>
</fieldset>

<fieldset id="t2">
    <legend>legend</legend>
    <x><div></div></x>
</fieldset>

<fieldset id="t3">
    <x><div></div><c></c></x>
</fieldset>

<fieldset id="t4">
    <x><div></div></x>
</fieldset>


</body>
</html>