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

Develop #5711

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Develop #5711

Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ The page should match the design Pixel Perfect: all the sizes, colors and distan

❗️ Replace `<your_account>` with your Github username and copy the links to `Pull Request` description:

- [DEMO LINK](https://<your_account>.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://<your_account>.github.io/layout_moyo-header/report/html_report/)
- [DEMO LINK](https://Julia-Pushko.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://Julia-Pushko.github.io/layout_moyo-header/report/html_report/)

❗️ Copy this `Checklist` to the `Pull Request` description after links, and put `- [x]` before each point after you checked it.

Expand Down
96 changes: 95 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,106 @@
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"
/>
<link
rel="stylesheet"
href="./style.css"
/>
</head>

<!-- <div class="container"> -->
<body>
<h1>Moyo header</h1>
<header class="header">
<a href="index.html">
<img
class="logo_png"
src="images/logo.png"
alt="moyo-logo"
/>
</a>

<nav class="nav">
<ul class="nav__list">
<li class="nav__item">
<a
class="nav__link is-active"
href="#"
>
apple
</a>
</li>
<li class="nav__item">
<a
class="nav__link"
href="#"
>
samsung
</a>
</li>
<li class="nav__item">
<a
class="nav__link"
href="#"
>
smartphones
</a>
</li>
<li class="nav__item">
<a
class="nav__link"
href="#"
data-qa="hover"
>
laptops & computers
</a>
</li>
<li class="nav__item">
<a
class="nav__link"
href="#"
>
gadgets
</a>
</li>
<li class="nav__item">
<a
class="nav__link"
href="#"
>
tablets
</a>
</li>
<li class="nav__item">
<a
class="nav__link"
href="#"
>
photo
</a>
</li>
<li class="nav__item">
<a
class="nav__link"
href="#"
>
video
</a>
</li>
</ul>
</nav>
</header>

<!-- </div> -->
</body>
</html>
75 changes: 75 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,78 @@
:root {
--main-color: #00acdc;
}

body {
margin: 0;
font-family: Roboto, sans-serif, Arial, Helvetica;
font-size: 12px;
}

.header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 50px;
width: 100%;
}

.logo_png {
display: block;
width: 40px;
height: 40px;
margin-top: 10px;
}

.nav__list {
display: flex;
align-items: center;
list-style: none;
justify-content: center;
padding-left: 0;
margin: 0 auto;
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ul has default vertical margins and left paddins. you need to reset them


.nav__item {
text-transform: uppercase;
justify-content: center;
margin-right: 20px;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the last item shouldn't have margin-right (read about :last-child) - it's said in description

font-size: 12px;
font-weight: 500;
height: 15px;
}

.nav__item:last-child {
margin-right: 0;
}

.nav__link {
display: block;
text-decoration: none;
font-size: 12px;
height: 15px;
color: #000;
justify-content: center;
align-items: center;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nav link should be on full width of height. add vettical padings and line-heitght which should make height 60px

padding: 10px 0;
}

.is-active {
color: var(--main-color);
}

.nav__list :hover {
color: var(--main-color);
}

a.is-active::after {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The a.is-active::after selector is used to style active links. Ensure that this class is applied correctly in the HTML to the intended elements to achieve the desired effect.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line under first link not visible. add position relative for .is-active class.

content: '';

/* position: absolute; */
display: block;

/* bottom: -17px; */
width: 100%;
background-color: var(--main-color);
border-radius: 8px;
height: 4px;
}
Loading