-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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 #5841
base: master
Are you sure you want to change the base?
moyo_header #5841
Changes from all 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 |
---|---|---|
|
@@ -4,7 +4,8 @@ | |
<meta charset="UTF-8" /> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" | ||
content="width=device-width, user-scalable=no, | ||
initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" | ||
/> | ||
<meta | ||
http-equiv="X-UA-Compatible" | ||
|
@@ -15,8 +16,89 @@ | |
rel="stylesheet" | ||
href="./style.css" | ||
/> | ||
<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" | ||
/> | ||
</head> | ||
<body> | ||
<h1>Moyo header</h1> | ||
<header class="header"> | ||
<a | ||
href="#" | ||
class="img-link" | ||
> | ||
<img | ||
class="img" | ||
src="./images/logo.png" | ||
alt="MOYO Logo image" | ||
/> | ||
</a> | ||
<nav class="nav"> | ||
<a | ||
href="#" | ||
class="box box-1 is-active" | ||
> | ||
Apple | ||
</a> | ||
|
||
<a | ||
href="#" | ||
class="box box-2" | ||
> | ||
Samsung | ||
</a> | ||
|
||
<a | ||
href="#" | ||
class="box box-3" | ||
> | ||
Smartphones | ||
</a> | ||
|
||
<a | ||
href="#" | ||
class="box box-4" | ||
data-qa="hover" | ||
> | ||
Laptops & Computers | ||
</a> | ||
|
||
<a | ||
href="#" | ||
class="box box-5" | ||
> | ||
Gadgets | ||
</a> | ||
|
||
<a | ||
href="#" | ||
class="box box-6" | ||
> | ||
Tablets | ||
</a> | ||
|
||
<a | ||
href="#" | ||
class="box box-7" | ||
> | ||
Photo | ||
</a> | ||
|
||
<a | ||
href="#" | ||
class="box box-8" | ||
> | ||
Video | ||
Comment on lines
+35
to
+99
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 |
||
</a> | ||
</nav> | ||
</header> | ||
</body> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,102 @@ | ||
body { | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
font-family: Roboto, Arial, sans-serif; | ||
background-color: grey; | ||
} | ||
|
||
:root { | ||
--blue-color: #00acdc; | ||
} | ||
|
||
.nav { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
text-align: center; | ||
line-height: 60px; | ||
height: 60px; | ||
margin-right: 50px; | ||
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 |
||
} | ||
|
||
@media (width: 1200px) { | ||
.img-link { | ||
margin-right: 419px; | ||
} | ||
} | ||
|
||
@media (width: 1024px) { | ||
.img-link { | ||
margin-right: 243px; | ||
Comment on lines
+25
to
+31
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 |
||
} | ||
} | ||
|
||
.header { | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: space-between; | ||
align-items: center; | ||
background-color: white; | ||
text-transform: uppercase; | ||
height: 60px; | ||
} | ||
|
||
.img { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
width: 40px; | ||
height: 40px; | ||
margin-top: 10px; | ||
margin-bottom: 10px; | ||
} | ||
|
||
.img-link { | ||
padding-left: 50px; | ||
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 |
||
} | ||
|
||
.box { | ||
font-family: Roboto, sans-serif; | ||
font-size: 12px; | ||
text-align: center; | ||
text-underline-position: from-font; | ||
text-decoration: none; | ||
font-weight: 500; | ||
color: #000; | ||
margin-right: 20px; | ||
flex-grow: 0; | ||
flex-shrink: 1; | ||
white-space: nowrap; | ||
} | ||
|
||
.box-8 { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
.box:hover { | ||
color: var(--blue-color); | ||
} | ||
|
||
.is-active { | ||
position: relative; | ||
color: var(--blue-color); | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
text-decoration: none; | ||
} | ||
|
||
.is-active::after { | ||
content: ''; | ||
position: absolute; | ||
bottom: -0.2px; | ||
left: 0; | ||
right: 0; | ||
margin: 0 auto; | ||
width: 37px; | ||
height: 4px; | ||
background-color: var(--blue-color); | ||
border-radius: 8px; | ||
} |
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
alt
attribute for the image is present, but it could be more descriptive. Consider providing a more detailed description to enhance accessibility for users relying on screen readers.