-
Notifications
You must be signed in to change notification settings - Fork 0
/
index1.html
79 lines (72 loc) · 1.61 KB
/
index1.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
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
79
<!DOCTYPE html>
<html lan g="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<style>
body{
background-image: url(html-color-codes-color-tutorials-hero.jpg);
background-repeat: no-repeat;
background-size: cover;
}
.center{
text-align: center;
position: absolute;
top: 50%;
left :50%;
transform: translate(-50%,-50%);
}
.deco{
background-color: rgb(242, 156, 102);
padding: 30px;
border-radius: 20px;
border: 1px solid black;
box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.5)
}
.font{
font-size: 30px;
font-family: 'Courier New', Courier, monospace;
}
ul{
margin: 0;
padding: 0;
list-style: none;
height: 40px;
line-height: 40px;
background-color: black;
font-size: large;
}
li{
float: left;
border-right: 1px solid #fff ;
}
a{
display: block;
padding: 0 30px;
color: #fff;
text-decoration: none;
}
a:hover{
background-color: blueviolet;
}
</style>
<div>
<ul>
<li><a href="#">Home</li>
<li><a href="#">About Me`</li>
<li><a href="#">Projects</li>
</ul>
</div>
<div class="center">
<div class="deco">
<div class="font">
<h3><b>how to center a div ?<b></h3>
</div>
</div>
</div>
</body>
</html>