forked from plistingart/Node_ComIT
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathabsolute3.html
More file actions
40 lines (37 loc) · 746 Bytes
/
absolute3.html
File metadata and controls
40 lines (37 loc) · 746 Bytes
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
<!DOCTYPE html>
<html>
<head>
<title>Learning CSS</title>
<style>
body {
position: relative;
border: 2px solid orange;
height: 400px;
padding: 0;
margin: 0;
font-size: 40px;
}
div.absolute {
position: absolute;
border: 1px solid black;
padding: 80px;
}
div.first {
background-color: red;
top: 20px;
left: 20px;
z-index: 2;
}
div.second {
background-color: green;
top: 60px;
left: 60px;
z-index: 1;
}
</style>
</head>
<body>
<div class="absolute first">First Div.</div>
<div class="absolute second">Second Div</div>
</body>
</html>