-
Notifications
You must be signed in to change notification settings - Fork 0
/
csspositionchallenge.html
39 lines (32 loc) · 1.03 KB
/
csspositionchallenge.html
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Challenge: Position planet</title>
<style>
#greeting {
background: rgb(255, 255, 0);
border: 2px solid black;
font-family: "Comic Sans MS", fantasy;
padding: 5px;
width: 262px;
position: absolute;
left:150px;
z-index 3;
}
#creature {position:absolute;
left:40px;
top:40px;
z-index:2;
}
#planet {position:absolute; z-index:1;}
</style>
</head>
<body>
<img id="planet" src="https://www.kasandbox.org/programming-images/space/planet.png" width="300">
<div id="greeting">
<p>Hello! Welcome to position planet!</p>
</div>
<img id="creature" src="https://www.kasandbox.org/programming-images/avatars/mr-pink.png">
</body>
</html>