-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.html
134 lines (116 loc) · 2.17 KB
/
test.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<!DOCTYPE html>
<html>
<head>
<style>
body{
font-family: 'Dancing Script', cursive;
background-color:#0A4A8A;
font-size: .8em;
}
h1{
text-align:center;
color:white;
}
.text{
text-align:center;
background:green;
color:white;
width:400px;
margin: 0 auto;
/* These are for design */
/*background:green;
color:white;
padding:5px;*/
}
.flexbox_1{
display:flex;
justify-content:center;
}
.multiple_margin{
width:400px;
margin:0 auto;
}
.red{
background:red;
}
.yellow{
background:yellow;
}
.flexbox_2{
display:flex;
justify-content:center;
}
.white{
width:200px;
height:200px;
background:white;
font-size: 2em;
text-align:center;
}
.pink{
width:200px;
height:200px;
background:pink;
font-size:2em;
text-align:center;
}
.absolute_positioning{
position:absolute;
left: 50%;
top: 80%;
transform: translate(-50%, -5%);
/* for extra designs */
background-color:black;
color:white;
width: 200px;
height: 50px;
font-size:1.5em;
}
/*#f0e68c*/;
.container {
display: grid;
border: 2px dashed rgba(114, 186, 94, 0.35);
height: 250px;
grid-template-columns: auto;
grid-template-rows: auto;
background: rgba(114, 186, 94, 0.05);
justify-items: center;
}
.item {
width: 50%;
height: 50%;
background: rgba(255, 213, 70, 0.4);
border: 2px dashed rgba(236, 198, 48, 0.5);
}
</style>
</head>
<body>
<h1>Horizontal Centering Tutorial (Text-align Method)</h1>
<div class="text">
<h2>Text-align on block Method</h2>
</div>
<div class="flexbox_1">
<img src="https://onaircode.com/wp-content/uploads/2017/11/logo-new-color-1.png">
</div>
<div class="outer-div">
<div class="inner-div"></div>
</div>
<div class="multiple_margin">
<div class="red">Child 1</div>
<div class="yellow">Child 2</div>
</div>
<div class="flexbox_2">
<div class="white">Child 1 Using Flex-box Method</div>
<div class="pink">Child 2 Using Flex-box Method </div>
</div>
<div class="absolute_positioning">
Absolute Positioning
</div>
<div class="grid">
<h3>Center Alignment with Grid</h3>
</div>
<div class="container">
<div class="item"></div>
</div>
</body>
</html>