Exemple
Exemple : XHTML
CTRL+C pour copier, CTRL+V pour coller
1
<html>
2
<head>
3
<title>Document</title>
4
<link href="exemple.css" type="text/css" rel="stylesheet" />
5
</head>
6
<body>
7
<h1>Document</h1>
8
<div id="chapter1" class="part chapter">
9
<h2>Chapitre 1</h2> <p>...</p>
10
<p>...</p>
11
</div>
12
<div id="chapter2" class="part chapter"> <h2>Chapitre 2</h2>
13
<p>...</p>
14
</div>
15
</body>
16
</html>
<html> <head> <title>Document</title> <link href="exemple.css" type="text/css" rel="stylesheet" /> </head> <body> <h1>Document</h1> <div id="chapter1" class="part chapter"> <h2>Chapitre 1</h2> <p>...</p> <p>...</p> </div> <div id="chapter2" class="part chapter"> <h2>Chapitre 2</h2> <p>...</p> </div> </body> </html>
Exemple : CSS
CTRL+C pour copier, CTRL+V pour coller
1
@page {
2
size: A4 portrait;
3
margin: 2cm;
4
@bottom-right {
5
content: counter(page);
6
font-size: 8pt;
7
font-family: "Computer Modern";
8
text-align: right;
9
}
10
}
11
div.part {
12
page-break-before: always;
13
}
14
h1, h2 {
15
text-align: center;
16
}
17
p {
18
text-align: justify;
19
orphans: 0;
20
widows: 0;
21
}
@page { size: A4 portrait; margin: 2cm; @bottom-right { content: counter(page); font-size: 8pt; font-family: "Computer Modern"; text-align: right; } } div.part { page-break-before: always; } h1, h2 { text-align: center; } p { text-align: justify; orphans: 0; widows: 0; }
Complément :
Introduction to page composition with CSS