aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/3rdparty/libraries/mpdf/examples/example10_floating_and_fixed_position_elements.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/3rdparty/libraries/mpdf/examples/example10_floating_and_fixed_position_elements.php')
-rw-r--r--inc/3rdparty/libraries/mpdf/examples/example10_floating_and_fixed_position_elements.php103
1 files changed, 0 insertions, 103 deletions
diff --git a/inc/3rdparty/libraries/mpdf/examples/example10_floating_and_fixed_position_elements.php b/inc/3rdparty/libraries/mpdf/examples/example10_floating_and_fixed_position_elements.php
deleted file mode 100644
index 8a485e35..00000000
--- a/inc/3rdparty/libraries/mpdf/examples/example10_floating_and_fixed_position_elements.php
+++ /dev/null
@@ -1,103 +0,0 @@
1<?php
2
3$html = '
4<style>
5.gradient {
6 border:0.1mm solid #220044;
7 background-color: #f0f2ff;
8 background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5;
9}
10h4 {
11 font-family: sans;
12 font-weight: bold;
13 margin-top: 1em;
14 margin-bottom: 0.5em;
15}
16div {
17 padding:1em;
18 margin-bottom: 1em;
19 text-align:justify;
20}
21.myfixed1 { position: absolute;
22 overflow: visible;
23 left: 0;
24 bottom: 0;
25 border: 1px solid #880000;
26 background-color: #FFEEDD;
27 background-gradient: linear #dec7cd #fff0f2 0 1 0 0.5;
28 padding: 1.5em;
29 font-family:sans;
30 margin: 0;
31}
32.myfixed2 { position: fixed;
33 overflow: auto;
34 right: 0;
35 bottom: 0mm;
36 width: 65mm;
37 border: 1px solid #880000;
38 background-color: #FFEEDD;
39 background-gradient: linear #dec7cd #fff0f2 0 1 0 0.5;
40 padding: 0.5em;
41 font-family:sans;
42 margin: 0;
43 rotate: 90;
44}
45</style>
46
47<body>
48<h1>mPDF</h1>
49<h2>Floating & Fixed Position elements</h2>
50
51<h4>CSS "Float"</h4>
52<div class="gradient">
53Block elements can be positioned alongside each other using the CSS property float: left or right. The clear property can also be used, set as left|right|both. Float is only supported on block elements (i.e. not SPAN etc.) and is not fully compliant with the CSS specification.
54Float only works properly if a width is set for the float, otherwise the width is set to the maximum available (full width, or less if floats already set).
55<br />
56Margin-right can still be set for a float:right and vice-versa.
57<br />
58A block element next to a float has the padding adjusted so that content fits in the remaining width. Text next to a float should wrap correctly, but backgrounds and borders will overlap and/or lie under the floats in a mess.
59<br />
60NB The width that is set defines the width of the content-box. So if you have two floats with width=50% and either of them has padding, margin or border, they will not fit together on the page.
61</div>
62
63<div class="gradient" style="float: right; width: 28%; margin-bottom: 0pt; ">
64<img src="tiger.wmf" style="float:right" width="70" />This is text in a &lt;div&gt; element that is set to float:right and width:28%. It also has an image with float:right inside. With this exception, you cannot nest elements with the float property set inside one another.
65</div>
66<div class="gradient" style="float: left; width: 54%; margin-bottom: 0pt; ">
67This is text in a &lt;div&gt; element that is set to float:left and width:54%.
68</div>
69
70<div style="clear: both; margin: 0pt; padding: 0pt; "></div>
71This is text that follows a &lt;div&gt; element that is set to clear:both.
72
73<h4>CSS "Position"</h4>
74At the bottom of the page are two DIV elements with position:fixed and position:absolute set
75
76<div class="myfixed1">1 Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. Sed egestas justo nec ipsum. Nulla facilisi. Praesent sit amet pede quis metus aliquet vulputate. Donec luctus. Cras euismod tellus vel leo. Sed egestas justo nec ipsum. Nulla facilisi. Praesent sit amet pede quis metus aliquet vulputate. Donec luctus. Cras euismod tellus vel leo.</div>
77
78<div class="myfixed2">2 Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. Sed egestas justo nec ipsum. Nulla facilisi. Praesent sit amet pede quis metus aliquet vulputate. Donec luctus. Cras euismod tellus vel leo.</div>
79
80
81';
82
83//==============================================================
84//==============================================================
85//==============================================================
86include("../mpdf.php");
87
88$mpdf=new mPDF();
89
90$mpdf->SetDisplayMode('fullpage');
91
92$mpdf->WriteHTML($html);
93
94$mpdf->Output();
95
96exit;
97
98//==============================================================
99//==============================================================
100//==============================================================
101
102
103?> \ No newline at end of file