Skip to content

Commit

Permalink
add solution
Browse files Browse the repository at this point in the history
  • Loading branch information
Elvira-Bariieva committed Dec 11, 2024
1 parent f2d4745 commit 69d3c1c
Showing 2 changed files with 128 additions and 0 deletions.
55 changes: 55 additions & 0 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -18,5 +18,60 @@
</head>
<body>
<h1>Moyo header</h1>

<header class="header">
<div class="image">
<img
src="./images/logo.png"
alt="logo Moyo"
/>
</div>

<nav>
<ul>
<li>
<a
href="index.html"
class="is-active"
>
Apple
</a>
</li>

<li>
<a href="index.html">Samsung</a>
</li>

<li>
<a href="index.html">Smartphones</a>
</li>

<li>
<a
href="index.html"
data-qa="hover"
>
Laptops & Computers
</a>
</li>

<li>
<a href="index.html">Gadgets</a>
</li>

<li>
<a href="index.html">Tablets</a>
</li>

<li>
<a href="index.html">Photo</a>
</li>

<li>
<a href="index.html">Video</a>
</li>
</ul>
</nav>
</header>
</body>
</html>
73 changes: 73 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,76 @@
body {
margin: auto;
font-style: Roboto;
background: rgba(229, 229, 229, 1);
}

:root {
--blue-color: #00acdc;
}

* {
box-sizing: border-box;
margin: 0;
font-family: Roboto, sans-serif;
font-size: 12px;
}

.header {
padding: 0 50px;
width: 100%;
display: flex;
justify-content: space-evenly;
align-items: center;
background-color: rgba(255, 255, 255, 1);
}

img {
height: 40px;
margin-top: 10px;
}

a {
display: block;
text-decoration: none;
line-height: 60px;
height: 60px;
color: rgba(0, 0, 0, 1);
}

nav a {
text-transform: uppercase;
}

.is-active {
color: var(--blue-color);
position: relative;
}

.is-active::after {
content: '';
position: absolute;
background-color: var(--blue-color);
width: 100%;
height: 4px;
border-radius: 8px;
left: 0;
bottom: 0;
right: 0;
}

ul {
list-style: none;
display: flex;
}

li:not(:first-child) {
margin-left: 20px;
}

li:last-child {
margin-right: 0;
}

a:hover {
color: var(--blue-color);
}

0 comments on commit 69d3c1c

Please sign in to comment.