-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
moyo-header #5757
base: master
Are you sure you want to change the base?
moyo-header #5757
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,13 +10,107 @@ | |
http-equiv="X-UA-Compatible" | ||
content="ie=edge" | ||
/> | ||
<title>Moyo header</title> | ||
<link | ||
rel="preconnect" | ||
href="https://fonts.googleapis.com" | ||
/> | ||
<link | ||
rel="preconnect" | ||
href="https://fonts.gstatic.com" | ||
/> | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" | ||
rel="stylesheet" | ||
/> | ||
<title>MOYO Header</title> | ||
<link | ||
rel="stylesheet" | ||
href="./style.css" | ||
/> | ||
</head> | ||
<body> | ||
<h1>Moyo header</h1> | ||
<header class="header"> | ||
<a | ||
class="img" | ||
href="index.html" | ||
> | ||
<img | ||
src="images/logo.png" | ||
alt="moyologo" | ||
/> | ||
</a> | ||
|
||
<nav class="nav"> | ||
<ul class="nav__list"> | ||
<li class="nav__item"> | ||
<a | ||
href="https://mate.academy/" | ||
class="nav__link is-active" | ||
> | ||
Apple | ||
</a> | ||
</li> | ||
<li class="nav__item"> | ||
<a | ||
href="https://mate.academy/" | ||
class="nav__link" | ||
> | ||
Samsung | ||
</a> | ||
</li> | ||
<li class="nav__item"> | ||
<a | ||
href="https://mate.academy/" | ||
class="nav__link" | ||
> | ||
Smartphones | ||
</a> | ||
</li> | ||
<li | ||
class="nav__item" | ||
data-qa="hover" | ||
> | ||
<a | ||
href="https://mate.academy/" | ||
class="nav__link" | ||
> | ||
Laptops & Computers | ||
</a> | ||
</li> | ||
<li class="nav__item"> | ||
<a | ||
href="https://mate.academy/" | ||
class="nav__link" | ||
> | ||
Gadgets | ||
</a> | ||
</li> | ||
<li class="nav__item"> | ||
<a | ||
href="https://mate.academy/" | ||
class="nav__link" | ||
> | ||
Tablets | ||
</a> | ||
</li> | ||
<li class="nav__item"> | ||
<a | ||
href="https://mate.academy/" | ||
class="nav__link" | ||
> | ||
Photo | ||
</a> | ||
</li> | ||
<li class="nav__item"> | ||
<a | ||
href="https://mate.academy/" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
class="nav__link" | ||
> | ||
Video | ||
</a> | ||
</li> | ||
</ul> | ||
</nav> | ||
</header> | ||
</body> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,99 @@ | ||
html { | ||
margin: 0; | ||
font-family: roboto, sans-serif; | ||
} | ||
|
||
body { | ||
margin: 0; | ||
} | ||
|
||
a { | ||
text-decoration: none; | ||
color: #000; | ||
} | ||
|
||
ul { | ||
padding: 0; | ||
list-style: none; | ||
} | ||
|
||
li { | ||
list-style: none; | ||
} | ||
|
||
.img { | ||
position: absolute; | ||
top: 10px; | ||
left: 50px; | ||
} | ||
|
||
.header { | ||
display: flex; | ||
|
||
background-color: #fff; | ||
|
||
justify-content: end; | ||
align-items: center; | ||
} | ||
|
||
.nav { | ||
/* background-color: chartreuse; */ | ||
|
||
width: 639px; | ||
height: 60px; | ||
display: flex; | ||
align-items: center; | ||
margin-right: 50px; | ||
} | ||
|
||
.nav__list { | ||
display: flex; | ||
width: 100%; | ||
align-items: center; | ||
|
||
/* background-color: blueviolet; */ | ||
|
||
justify-content: space-between; | ||
} | ||
|
||
.nav__item { | ||
/* background-color: beige; */ | ||
display: flex; | ||
align-items: center; | ||
flex-direction: row; | ||
justify-content: center; | ||
} | ||
|
||
.nav__link { | ||
/* background-color: cyan; */ | ||
height: 60px; | ||
display: flex; | ||
font-weight: 500; | ||
color: #000; | ||
font-size: 12px; | ||
text-transform: uppercase; | ||
align-items: center; | ||
} | ||
|
||
.nav__link:hover { | ||
color: #00acdc; | ||
} | ||
Comment on lines
+78
to
+80
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
|
||
.is-active { | ||
color: #00acdc; | ||
display: flex; | ||
align-items: center; | ||
position: relative; | ||
} | ||
|
||
.is-active::after { | ||
content: ''; | ||
|
||
background-color: #00acdc; | ||
border: solid #00acdc 1px; | ||
height: 2px; | ||
border-radius: 8px; | ||
position: absolute; | ||
bottom: 0; | ||
width: 36px; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
<nav>
element should not contain the logo. Consider moving the logo outside the<nav>
element to maintain proper semantic structure.