-
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
add task solution #4919
base: master
Are you sure you want to change the base?
add task solution #4919
Changes from 4 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 | ||||
---|---|---|---|---|---|---|
|
@@ -15,8 +15,99 @@ | |||||
rel="stylesheet" | ||||||
href="./style.css" | ||||||
/> | ||||||
<link | ||||||
rel="stylesheet" | ||||||
href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap" | ||||||
/> | ||||||
</head> | ||||||
<body> | ||||||
<h1>Moyo header</h1> | ||||||
<header class="site_header"> | ||||||
<a | ||||||
class="logo" | ||||||
href="index.html" | ||||||
> | ||||||
<img | ||||||
src="./images/logo.png" | ||||||
alt="logo" | ||||||
/> | ||||||
</a> | ||||||
|
||||||
<nav class="nav"> | ||||||
<ul class="nav__list"> | ||||||
<li class="nav_li"> | ||||||
<a | ||||||
class="is-active nav_a" | ||||||
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 same as above
Suggested change
|
||||||
href="index.html" | ||||||
> | ||||||
Apple | ||||||
</a> | ||||||
</li> | ||||||
|
||||||
<li class="nav_li"> | ||||||
<a | ||||||
class="nav_a" | ||||||
href="index.html" | ||||||
> | ||||||
Samsung | ||||||
</a> | ||||||
</li> | ||||||
|
||||||
<li class="nav_li"> | ||||||
<a | ||||||
class="nav_a" | ||||||
href="index.html" | ||||||
> | ||||||
Smartphones | ||||||
</a> | ||||||
</li> | ||||||
|
||||||
<li class="nav_li"> | ||||||
<a | ||||||
class="nav_a" | ||||||
data-qa="hover" | ||||||
href="index.html" | ||||||
> | ||||||
Laptops & Computers | ||||||
</a> | ||||||
</li> | ||||||
|
||||||
<li class="nav_li"> | ||||||
<a | ||||||
class="nav_a" | ||||||
href="index.html" | ||||||
> | ||||||
Gadgets | ||||||
</a> | ||||||
</li> | ||||||
|
||||||
<li class="nav_li"> | ||||||
<a | ||||||
class="nav_a" | ||||||
href="index.html" | ||||||
> | ||||||
Tablets | ||||||
</a> | ||||||
</li> | ||||||
|
||||||
<li class="nav_li"> | ||||||
<a | ||||||
class="nav_a" | ||||||
href="index.html" | ||||||
> | ||||||
Photo | ||||||
</a> | ||||||
</li> | ||||||
|
||||||
<li class="nav_li"> | ||||||
<a | ||||||
class="nav_a" | ||||||
href="index.html" | ||||||
> | ||||||
Video | ||||||
</a> | ||||||
</li> | ||||||
</ul> | ||||||
</nav> | ||||||
</header> | ||||||
</body> | ||||||
</html> |
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
@@ -1,3 +1,76 @@ | ||||
:root { | ||||
--nav-active: #00acdc; | ||||
--header-color: #fff; | ||||
--nav-color: #000; | ||||
--nav-backgroundcolor: #fff; | ||||
} | ||||
|
||||
* { | ||||
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. better not adding a lot of styles to * selector without necessary For example, if you add font-family and font-size to What really should be here is |
||||
margin: 0; | ||||
box-sizing: border-box; | ||||
} | ||||
|
||||
body { | ||||
margin: 0; | ||||
font-family: Roboto, sans-serif; | ||||
font-size: 12px; | ||||
} | ||||
|
||||
.site_header { | ||||
width: 100%; | ||||
display: flex; | ||||
align-items: center; | ||||
justify-content: space-between; | ||||
background-color: var(--header-color); | ||||
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. This color is default
Suggested change
|
||||
padding: 0 50px; | ||||
} | ||||
|
||||
.logo { | ||||
height: 40px; | ||||
width: 40px; | ||||
} | ||||
|
||||
.nav_li { | ||||
align-items: center; | ||||
text-transform: uppercase; | ||||
margin-right: 20px; | ||||
} | ||||
|
||||
.nav__list { | ||||
display: flex; | ||||
padding: 0; | ||||
list-style: none; | ||||
} | ||||
|
||||
.nav_a { | ||||
display: block; | ||||
position: relative; | ||||
line-height: 60px; | ||||
text-decoration: none; | ||||
color: var(--nav-color); | ||||
font-size: 12px; | ||||
font-weight: 500; | ||||
} | ||||
|
||||
.nav_li:last-child { | ||||
margin-right: 0; | ||||
} | ||||
|
||||
.nav_a:hover { | ||||
color: var(--nav-active); | ||||
} | ||||
|
||||
.is-active { | ||||
color: var(--nav-active); | ||||
} | ||||
|
||||
.is-active::after { | ||||
content: ''; | ||||
position: absolute; | ||||
background-color: var(--nav-active); | ||||
border-radius: 8px; | ||||
height: 4px; | ||||
bottom: 0; | ||||
right: 0; | ||||
left: 0; | ||||
} |
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.
fix class everywhere