-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathalign_09.html
More file actions
65 lines (59 loc) · 1.94 KB
/
align_09.html
File metadata and controls
65 lines (59 loc) · 1.94 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
<!DOCTYPE html>
<html lang="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>Align</title>
<style>
body{
font-family: Arial, Helvetica, sans-serif;
line-height: 1.4em;
}
/* How to Center the content (Container) on the page*/
/* Step 1: Wrap the content in a div (Class or ID) */
/* Step 2: * use max width* width and set the margin */
/* margin auto sets the same amount to both sides
and push the content to the center */
.main{
/* If we use width, it won't be mobile responsive */
max-width: 900px;
margin: auto;
}
.card{
background: lightgoldenrodyellow;
border: 2px chocolate solid;
padding: 20px;
margin-bottom: 30px;
}
.card p{
/* How to allign the text (by default its align to the left) */
text-align: left;
text-align: right;
text-align: center;
/* It makes the text justify to the content
its gonna be even on the edges */
text-align: justify;
}
.card h2{
text-align: center;
}
</style>
</head>
<body>
<div class="main">
<div id="home" class="card">
<h2>Software Engineering</h2>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Architecto, illum?</p>
</div>
<div id="about" class="card">
<h2>About Us</h2>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Architecto, illum?</p>
</div>
<div id="contact" class="card">
<h2>Contact us</h2>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Architecto, illum?</p>
</div>
</div>
</body>
</html>