Skip to content

Commit dd1ca19

Browse files
committed
align navbar
1 parent e144aed commit dd1ca19

File tree

2 files changed

+34
-19
lines changed

2 files changed

+34
-19
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<header>
3838
<nav>
3939
<ul class="menu">
40-
<li id="home"> <a href="#"><i class="fa fa-house fa-xl"></i></a></li>
40+
<li id="home"> <a href="#"><i class="fa fa-house fa-lg"></i></a></li>
4141
<li>
4242
<a class="nav-link" href="#work">Work</a>
4343
<a class="nav-link" href="#contact">Contact</a>

styles.css

Lines changed: 33 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
font-size: 25px;
66
scroll-behavior: smooth;
77
}
8-
body{
8+
9+
body {
910
margin: 0;
1011
}
12+
1113
/* elements */
1214
p {
1315
color: var(--default-font-color);
@@ -26,10 +28,7 @@ h3 {
2628
}
2729

2830
/* % always with the property width */
29-
header{
30-
/* background-color: rgba(9, 3, 15, 0.551); */
3131

32-
}
3332
section {
3433
/* for guide */
3534
/* border: solid 3px aqua; */
@@ -39,7 +38,7 @@ section {
3938
margin-bottom: 5em;
4039
height: 70vh;
4140
z-index: 2;
42-
41+
4342
}
4443

4544
footer {
@@ -181,10 +180,12 @@ i {
181180
transition: all 0.5s ease-in-out;
182181

183182
}
184-
.work-link:visited{
183+
184+
.work-link:visited {
185185
color: aqua;
186186
text-decoration-color: aqua;
187187
}
188+
188189
/* mouse over link */
189190
.work-link:hover {
190191
color: var(--default-font-family);
@@ -210,40 +211,52 @@ a:hover>i {
210211
.br-show {
211212
display: none;
212213
}
213-
nav{
214-
position:fixed;
214+
215+
nav {
216+
position: fixed;
215217
top: 0;
216218
width: 100%;
217219
z-index: 9999;
218220
background-color: rgba(9, 3, 15, 0.9);
219221

220222
}
221-
.menu{
223+
224+
.menu {
222225
list-style-type: none;
223226
display: flex;
224-
flex-direction:row;
227+
flex-direction: row;
225228
justify-content: space-between;
226229
}
227-
#home{
230+
231+
#home {
228232
padding: 0.5em;
233+
align-self: center;
229234
}
230-
.nav-link{
235+
236+
.nav-link {
231237
padding: 1em;
232238
color: white;
233-
text-decoration:none;
239+
text-decoration: none;
234240
/* background-image:none; */
235241
transition: all 0.5s ease-in-out;
236242

237243
}
238-
.nav-link:hover{
244+
245+
.nav-link:hover {
239246
background-color: rgb(36, 28, 45);
240247
color: aqua !important
241248
}
242-
.nav-link:visited{
243-
color: white ;
244-
text-decoration:none;
245-
background-image:none;
249+
250+
.nav-link:visited {
251+
color: white;
252+
text-decoration: none;
253+
background-image: none;
246254
}
255+
256+
.menu>li {
257+
align-self: center;
258+
}
259+
247260
@media (max-width: 1100px) {
248261
:root {
249262
font-size: 23px;
@@ -281,9 +294,11 @@ nav{
281294
:root {
282295
font-size: 13px;
283296
}
297+
284298
p {
285299
max-width: 330px;
286300
}
301+
287302
section,
288303
footer {
289304
width: 80%;

0 commit comments

Comments
 (0)