File: margins.html

package info (click to toggle)
liblayout 0.2.10-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 5,332 kB
  • sloc: java: 51,125; xml: 138; makefile: 17
file content (90 lines) | stat: -rw-r--r-- 2,427 bytes parent folder | download | duplicates (5)
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
80
81
82
83
84
85
86
87
88
89
90
<html>
<head>
  <style type="text/css">
    br {
      border: 1pt solid black;
      background-color: green;

    }

  </style>
</head>

<body><!--  style="width:595pt"> -->

<h1>
  The first working margins test
</h1>
<div style="margin: 10pt; background-color: green">
  <div style="margin: 20pt; background-color: blue">
    test
  </div>
</div>

<h1>
  Testing nested margins
</h1>
<div style="margin: 1em">
  <div style="margin: 2em">
    <div style="margin: 1em">
      Test
    </div>
  </div>
</div>


<h1>
  Testing how borders affect the nested margins
</h1>
<div style="border: 1pt solid black; margin: 2em">
  <div style="border: none; margin: 2em">
    <div style="border: 1pt solid black; margin: 2em">

    </div>
  </div>
</div>

<h3>Testing, how margins in Inline-Elements affect the system.</h3>
<p>
  A long line that can be broken down. <span style="margin: 100pt; color: blue;">A line with margin-top: 10pt.</span> Does that line have any effect?
</p>

<p>
  A long line that can be broken down. <span style="margin: 100pt; color: blue; display:inline-block;">A inline-block with margin-top: 10pt.</span> Does that line have any effect?
</p>

<p>
  A long line that can be broken down. <span style="border: 1pt solid black; margin: 100pt; color: blue; display:inline-block;">A inline-block with margin-top: 10pt.</span> Does that line have any effect?
</p>

<h3>Testing nested margins</h3>
<div style="border: 1px solid red">
  <div style="margin: 10pt; background-color:green">
    <div style="margin: 50pt; background-color:yellow">
      Test
    </div>
  </div>
</div>
The Green area in the left and right is 50pt, as inline-level margins never
collapse. The distance between the red box and the top and bottom edge is 50pt.
The distance between the left/right edge and the border of the box is 10pt.

<h3>Testing nested margins (collapsing at the root)</h3>
<div style="margin: 10pt; background-color:green">
  <div style="margin: 50pt; background-color:yellow">
    Test
  </div>
</div>
The Green area in the left and right is 50pt, as inline-level margins never
collapse. The distance between the red box and the top and bottom edge is 50pt.
The distance between the left/right edge and the border of the box is 10pt.

<table border="0">
  <tr>
    <td style="background-color:yellow">
      <div style="margin: 50pt; background-color: green">Test</div>
    </td>
  </tr>
</table>
</body>
</html>