summaryrefslogtreecommitdiff
path: root/legacy/works/margin-background1.html
blob: a310dd5bf44f98c49e15eb930e1aeed5c2189819 (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
<!DOCTYPE html>
<html>
<head>
<title>Testcase for interaction between margins and background on body</title>
<style type="text/css">
/* Backgrounds on the body element are positioned as if they 
 * were specified on the root element _unless_ the root element 
 * already has its own background (i.e. in this case, the 
 * background image should be touching the left edge of the viewport)
 */
body {
	margin-left: 136px;
	background-image: url(../images/bg.gif);
	background-repeat: repeat-y;
	background-position: top left;
}

#foo {
	margin-left: 136px;
	width: 400px;
	height: 400px;
	background-color: green;
	background-image: url(../images/bg.gif);
	background-repeat: repeat-x;
}
</style>
</head>
<body>
  <div id="foo"></div>
</body>
</html>