Skip to content
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

add solution #4584

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,43 @@
<!doctype html>
<html lang="en">

<head>
<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">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Moyo header</title>
<link rel="shortcut icon" href="images/logo.png">
<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">
<link rel="stylesheet" href="./style.css">
</head>

<body>
<h1>Moyo header</h1>
<header class="header">
<a href="#" class="logo">
<img src="images/logo.png" alt="Logo"
class="logo">
michelletani marked this conversation as resolved.
Show resolved Hide resolved
</a>
<nav class="nav">
michelletani marked this conversation as resolved.
Show resolved Hide resolved
<ul class="nav__list">
<li class="nav__item"><a href="#apple" class="nav__link is-active">Apple</a></li>
<li class="nav__item"><a href="#samsung" class="nav__link">Samsung</a></li>
<li class="nav__item"><a href="#smartphones" class="nav__link">Smartphones</a></li>
<li class="nav__item">
<a href="laptops&computers"
data-qa="hover"
class="nav__link">
Laptops & Computers
</a>
michelletani marked this conversation as resolved.
Show resolved Hide resolved
</li>
<li class="nav__item"><a href="#gadgets" class="nav__link">Gadgets</a></li>
<li class="nav__item"><a href="#tablets" class="nav__link">Tablets</a></li>
<li class="nav__item"><a href="#photo" class="nav__link">Photo</a></li>
<li class="nav__item"><a href="#video" class="nav__link">Video</a></li>
</ul>
</nav>
</header>
</body>
</html>
101 changes: 101 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,104 @@
:root {
--link-color: #00ACDC;
}

html {
font-family: Roboto, sans-serif;
font-style: normal;
font-weight: 500;
}

body {
box-sizing: border-box;
michelletani marked this conversation as resolved.
Show resolved Hide resolved
margin: 0;
padding: 0;
michelletani marked this conversation as resolved.
Show resolved Hide resolved
}

.header {
padding: 0 50px;
display: flex;
justify-content: space-between;
align-items: center;
max-width: 100%;
height: 100%;
margin-top: 0;
michelletani marked this conversation as resolved.
Show resolved Hide resolved
}

.nav {
padding: 0;
margin: 0;
}
michelletani marked this conversation as resolved.
Show resolved Hide resolved

.nav__list {
display: flex;
list-style: none;
padding: 0;
margin: 0;
font-size: 12px;
text-align: center;
michelletani marked this conversation as resolved.
Show resolved Hide resolved
}

.nav__item {
margin-left: 20px;
font-size: 12px;
text-align: right;
michelletani marked this conversation as resolved.
Show resolved Hide resolved
}

.nav__item:first-child {
margin-left: 0;
}

.nav__link {
display: block;
position: relative;
michelletani marked this conversation as resolved.
Show resolved Hide resolved
text-decoration: none;
color: #000;
font-size: 12px;
text-transform: uppercase;
font-style: normal;
line-height: 60px;
font-weight: 500;
text-align: right;
padding: 0;
margin: 0;

}

.nav__link:hover {
color: #00ACDC;
border-radius: 8px;
height: 4px;
max-height: 60px;
michelletani marked this conversation as resolved.
Show resolved Hide resolved
}

.logo_link {
display: block;
height: 40px;
}

.logo {
width: 40px;
height: 40px;
}

.is-active {
color: #00ACDC;
border-radius: 8px;
height: 4px;
max-height: 60px;
bottom: 0;
padding-bottom: 10px;
}

.is-active::after {
position: absolute;
bottom: 0;
michelletani marked this conversation as resolved.
Show resolved Hide resolved
content: "";
display: block;
background-color: #00ACDC;
michelletani marked this conversation as resolved.
Show resolved Hide resolved
border-radius: 8px;
height: 4px;
max-height: 60px;
michelletani marked this conversation as resolved.
Show resolved Hide resolved
margin: 0;
padding: 0 auto;
michelletani marked this conversation as resolved.
Show resolved Hide resolved
}
Loading