-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflexbox-practice-4.html
More file actions
192 lines (173 loc) · 4.55 KB
/
flexbox-practice-4.html
File metadata and controls
192 lines (173 loc) · 4.55 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
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Flexbox in Practice</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/all.css">
<style>
* {
box-sizing: border-box;
}
body {
margin: 0;
font-family: "Nunito Sans", SansSerif;
min-height: 100vh; /* to keep footer at the bottom of the page */
}
footer {
background: black;
position: absolute;
bottom: 0;
width: 100%;
}
.container {
min-width: 768px;
width: 95%;
max-width: 1400px;
margin: 0 auto;
}
h1 {
font-size: 2em;
}
footer h1 {
margin: 0;
font-weight: bolder;
}
h5 {
color: white;
font-weight: 200;
text-align: center;
}
footer a {
color: white;
text-decoration: none;
}
footer .icon-wrapper:hover,
footer .top-footer a:hover {
color: black;
background: white;
}
footer ul {
list-style: none;
margin: 0;
padding: 0;
}
footer .container {
padding: 4em 0;
height: 30em;
display: flex;
flex-direction: column;
justify-content: space-between;
/* here we make the footer a flex container in a column layout to evenly space the sections of the footer */
}
.top-footer {
/* here we make the top footer section a flex container to space out the multiple lists of links */
display: flex;
justify-content: space-between;
gap: 50px;
}
footer .bottom-footer {
/* here we ensure the social media link container is horizontally centered by setting its parent to be a flex container */
}
.icon-wrapper {
border: 2px solid grey;
border-radius: 2.4em;
height: 2.4em;
width: 2.4em;
/* here we make the icon wrappers into flex containers to center the icons */
}
.icon-wrapper i {
/* here we center the icons inside their flex container wrappers */
}
.logo-div {
/* here we set a larger size along the main axis and push the div a bit up for aesthetics */
/*flex-grow: 1;*/
margin-right: auto;
position: relative;
bottom: 25px;
}
.social-media-links {
/* here we make the div containing the social media links into a flex container to orient them in a row */
justify-content: center;
display: flex;
}
footer .top-footer a {
text-transform: uppercase;
font-weight: 200;
}
footer .bottom-footer a {
margin: .3em;
}
.line {
width: 100%;
height: 1px;
background: grey;
}
</style>
</head>
<body>
<header class="container">
<h1>Flexbox in Practice: Footer</h1>
</header>
<footer>
<div class="container">
<section class="top-footer">
<div class="logo-div">
<h1><a href="#">Logo</a></h1>
<a href="#">Sologan Company</a>
</div>
<ul>
<li><a href="#">Weebly Themes</a></li>
<li><a href="#">Pre-Sale FAQS</a></li>
<li><a href="#">Submit a Ticket</a></li>
</ul>
<ul>
<li><a href="#">Services</a></li>
<li><a href="#">Theme Tweak</a></li>
</ul>
<ul>
<li><a href="#">Showcase</a></li>
<li><a href="#">Widgetkit</a></li>
<li><a href="#">Support</a></li>
</ul>
<ul>
<li><a href="#">About Us</a></li>
<li><a href="#">Contact Us</a></li>
<li><a href="#">Affiliates</a></li>
<li><a href="#">Resources</a></li>
</ul>
</section>
<div class="line"></div>
<section class="bottom-footer">
<div class="social-media-links">
<a href="#">
<span class="icon-wrapper">
<i class="fab fa-facebook-f"></i>
</span>
</a>
<a href="#">
<span class="icon-wrapper">
<i class="fab fa-twitter"></i>
</span>
</a>
<a href="#">
<span class="icon-wrapper">
<i class="fas fa-rss"></i>
</span>
</a>
<a href="#">
<span class="icon-wrapper">
<i class="fab fa-google-plus-g"></i>
</span>
</a>
<a href="#">
<span class="icon-wrapper">
<i class="fab fa-linkedin-in"></i>
</span>
</a>
</div>
<h5>@Copyright. All rights reserved.</h5>
</section>
</div>
</footer>
</body>
</html>