blob: 77084181ba10e03c26ca78593f53a41c7c01d9ac (
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
|
<html>
<head>
<style>
div {
display: -moz-box;
display: -webkit-box;
display: box;
}
div.outer {
width: 300px;
height: 100px;
background-color: red;
-moz-box-orient: vertical;
-webkit-box-orient: vertical;
box-orient: vertical;
-moz-box-align: center;
-webkit-box-align: center;
box-align: center;
position: relative;
}
div.sides {
position: absolute;
top: 0px;
width: 100px;
height: 100px;
background-color: green;
}
div.middle {
width: 100px;
height: 100px;
background-color: green;
}
</style>
</head>
<body>
<p>You should see a 300x100 green rectangle below. If you see any red, the test has failed.
This test makes a positioned vertical box with three children. The first and third children are
absolutely positioned at the edges of the box. Box-align of center is used to align the second
child in the center of the box.
</p>
<div class="outer">
<div class="sides"></div>
<div class="middle"></div>
<div class="sides" style="left:200px"></div>
</div>
</body>
|