forked from kbalog/web-programming
-
Notifications
You must be signed in to change notification settings - Fork 1
/
exercise3.html
51 lines (46 loc) · 1.14 KB
/
exercise3.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
40
41
42
43
44
45
46
47
48
49
50
51
<!DOCTYPE html>
<html>
<head>
<title>Exercise #3: Styling boxes</title>
<style>
div {
width: 50px;
height: 50px;
border: 1px solid black;
margin: 5px;
float: left; /* float divs next to each other */
font-family: Verdana, sans-serif;
font-weight: bold;
line-height: 50px; /* align text vertically (this works only for a single line of text) */
text-align: center;
}
.even {
background-color: #0033cc;
}
.odd {
background-color: #ff3333;
}
.smallnum {
font-size: 0.7em;
}
.largenum {
font-size: 1.3em;
}
#lucky7 {
color: white;
}
</style>
</head>
<body>
<div class="odd smallnum">1</div>
<div class="even smallnum">2</div>
<div class="odd smallnum">3</div>
<div class="even">4</div>
<div class="odd">5</div>
<div class="even">6</div>
<div class="odd" id="lucky7">7</div>
<div class="even largenum">8</div>
<div class="odd largenum">9</div>
<div class="even largenum">10</div>
</body>
</html>