aboutsummaryrefslogtreecommitdiffstats
path: root/test/layout/position-absolute-margin-padding-subtracted-from-available-space.html
blob: 6d22c42d6e1413da5808502eb6d08fbc50be4208 (plain) (blame)
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
<!DOCTYPE html>
<div style="position: relative; width: 10ch; height: 5em; background: purple">
<div style="margin-left: 5ch; position: absolute; background: red">
test test test test
</div>
</div>
<div style="position: relative; width: 10ch; height: 5em; background: purple; box-sizing: border-box">
<div style="padding-left: 5ch; width: 10ch; position: absolute; box-sizing: border-box; background: red">
test test test test
</div>
</div>
<div style="position: relative; width: 10ch; height: 5em; background: red">
<div style="padding-left: 5ch; width: 10ch; position: absolute">
test test test test
</div>
</div>
<div style="position: relative; width: 10ch; height: 5em; background: red">
<div style="left: 5ch; width: 10ch; position: absolute">
test test test test
</div>
</div>

<div style="position: relative; width: 10ch; height: 5em; background: purple">
<div style="margin-left: 5ch; position: absolute; background: red">
test test test test
</div>
</div>
<div style="position: relative; width: 10ch; height: 5em; background: purple; box-sizing: border-box">
<div style="padding-left: 5ch; position: absolute; box-sizing: border-box; background: red">
test test test test
</div>
</div>
<div style="position: relative; width: 10ch; height: 5em; background: red">
<div style="padding-left: 5ch; position: absolute">
test test test test
</div>
</div>
<div style="position: relative; width: 10ch; height: 5em; background: red">
<div style="left: 5ch; position: absolute">
test test test test
</div>
</div>
<div style="position: absolute; left: 50%; width: 60ch; margin-left: -30ch">
<div style="position: relative; left: 50%; margin-left: -30ch; width: 60ch; text-align: center">

test
</div>
</div>