blob: c56686826835afbe9fdfd4fa0895d174fe953f12 (
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
|
<!DOCTYPE html>
<html>
<style>
body { background: white; }
.rel, body { position: relative; }
div > div { direction: ltr; height: 10px; }
div > div > div { width: 100px; background: lime; position: absolute }
.rtl { direction: rtl; }
#testpercentmargin > div > div { margin: 0 4%; }
#testabsolutemargin > div > div { margin: 0 20px; }
#testpercentpadding > div { padding: 0 4%; }
#testabsolutepadding > div { padding: 0 20px; }
#testborderparent > div { border-width: 0 20px; border-color: white; border-style: solid; }
#testborderkid > div > div { border-width: 0 20px; border-color: white; border-style: solid; }
</style>
<body style="width: 500px; margin-left: 100px;">
<div id="testplain">
<div><div></div></div>
<div class="rel"><div></div></div>
<div class="rtl"><div></div></div>
<div class="rel rtl"><div></div></div>
</div>
<div id="testpercentmargin">
<div><div></div></div>
<div class="rel"><div></div></div>
<div class="rtl"><div></div></div>
<div class="rel rtl"><div></div></div>
</div>
<div id="testabsolutemargin">
<div><div></div></div>
<div class="rel"><div></div></div>
<div class="rtl"><div></div></div>
<div class="rel rtl"><div></div></div>
</div>
<div id="testpercentpadding">
<div><div></div></div>
<div class="rel"><div></div></div>
<div class="rtl"><div></div></div>
<div class="rel rtl"><div></div></div>
</div>
<div id="testabsolutepadding">
<div><div></div></div>
<div class="rel"><div></div></div>
<div class="rtl"><div></div></div>
<div class="rel rtl"><div></div></div>
</div>
<div id="testborderparent">
<div><div></div></div>
<div class="rel"><div></div></div>
<div class="rtl"><div></div></div>
<div class="rel rtl"><div></div></div>
</div>
<div id="testborderkid">
<div><div></div></div>
<div class="rel"><div></div></div>
<div class="rtl"><div></div></div>
<div class="rel rtl"><div></div></div>
</div>
</body>
</html>
|