blob: 742ef0cbe1eb5859d85a307332ff930c789be607 (
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
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>reference for abspos-inline-007</title>
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style type="text/css">
.block-container {
font: 20px Ahem;
height: 20px;
position: relative;
top: -1px;
}
.inline-container {
position: relative;
border: 1px solid black;
display: inline-block;
}
.parent-block {
display: inline-block;
width: 30px;
height: 10px;
}
.abspos {
position: absolute;
width: 10px;
height: 10px;
background-color: green;
display: inline-block;
vertical-align: baseline;
}
.br {
right: 0;
bottom: 0;
}
.tl {
top: 0;
left: 0;
}
.filler {
display: inline-block;
width: 30px;
height: 10px;
}
</style>
</head>
<body>
<div class="block-container">
x
<div class="inline-container">
tl
<div class="abspos tl"></div>
<div class="parent-block"></div>
<div class="filler"></div>
</div>x
<div class="inline-container">
br
<div class="abspos br"></div>
<div class="parent-block"></div>
<div class="filler"></div>
</div>x
<div class="inline-container">
static
<div class="abspos" style="position:static"></div><div class="parent-block"></div>
<div class="filler" style="width: 20px;"></div>
</div>
</div>
<p>Tests abspos positioning of an Element that 1) has an inline containing
block, and 2) is not a child of the inline containing block, but a descendant.</p>
</body>
</html>
|