summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/CSS2/page-box/page-container-001.xht
blob: 00976ee76baa9a0e2152db3f210fd0d677cec199 (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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
  <title>CSS Test: paged media abspos containing block</title>
  <link rel="author" title="Melinda Grant" href="mailto:melinda.grant@hp.com" />
  <link rel="help" href="http://www.w3.org/TR/CSS21/page.html#page-box" />
  <link rel="help" href="http://www.w3.org/TR/css3-page/#page-box-page-rule" />
  <meta name="flags" content="paged" />
  <meta name="assert" content="For a single-page document, the containing box for positioned content with no positioned ancestor is the page area." />
  <style type="text/css">

@page
{
  margin: .5in;
}
body
{
	padding: 8px;
}
div
{
  position: absolute;
  width: 40%;
}
.topleft
{
  top: 0;
  left: 0;
  background: blue;
}
.bottomright
{
	bottom: 0;
	right: 0;
	background: fuchsia;
}
.centered
{
	height: 20%;
	width: 30%;
	top: 40%;
	left: 35%;
	background: yellow;
}
p
{
	margin-left: 55%;
}

  </style>
 </head>
 <body>
  <p>There must be three boxes containing descriptive text on this page.</p>
  <div class="topleft">This blue box must be in the upper-left corner of the page, one half inch below the top of the page and one half inch from the left edge of the page.</div>
  <div class="bottomright">This fuchsia box must be in the lower right corner, one half inch from the right and bottom edges of the page.</div>
  <div class="centered">This yellow box must be centered on the page.</div>
 </body>
</html>