-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcss_positioning.html
More file actions
78 lines (59 loc) · 1.32 KB
/
css_positioning.html
File metadata and controls
78 lines (59 loc) · 1.32 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Positioning Excercise</title>
<style>
h1{
margin:25px;
}
.box{
position: relative;
width: 50px;
height: 50px;
padding:10px;
border:1px solid black;
margin:25px;
color:white;
font-weight: bold;
float:left;
}
#box1{
background-color:red;
}
#box2{
background-color:orange;
}
#box3{
background-color:yellow;
}
#box4{
background-color:green;
}
#box5{
background-color:blue;
}
#box6{
background-color:violet;
}
.box>img{
position: absolute;
bottom: 50px;
left: 50px;
}
div:nth-child(2n+0)
{
clear:left;
}
</style>
</head>
<body>
<h1><a href="https://en.wikipedia.org/wiki/Visible_spectrum">Visible Spectrum Wavelengths</a></h1>
<div id="box1" class="box">620-750 nm<img src="img/codeup-arrow.png"></div>
<div id="box2" class="box">590-620 nm<img src="img/codeup-arrow.png"></div>
<div id="box3" class="box">570-590 nm<img src="img/codeup-arrow.png"></div>
<div id="box4" class="box">495-570 nm<img src="img/codeup-arrow.png"></div>
<div id="box5" class="box">450-495 nm<img src="img/codeup-arrow.png"></div>
<div id="box6" class="box">380-450 nm<img src="img/codeup-arrow.png"></div>
</body>
</html>