-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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 header #5740
base: master
Are you sure you want to change the base?
add header #5740
Changes from 1 commit
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,25 @@ | |
rel="stylesheet" | ||
href="./style.css" | ||
/> | ||
<link rel="preconnect" href="https://fonts.googleapis.com"> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> | ||
<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="http://127.0.0.1:5500/src/index.html"><img class="img" src="images/logo.png" alt="logo"></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. It's recommended to use 'https' instead of 'http' for the link to improve security, even for local development. This ensures consistency with other secure links in the document. |
||
<nav class="nav"> | ||
<ul> | ||
<li><a class="is-active" href="#">apple</a></li> | ||
<li><a href="#">samsung</a></li> | ||
<li><a href="#">smartphones</a></li> | ||
<li><a data-qa="hover" href="#">laptops & computers</a></li> | ||
<li><a href="#">gadgets</a></li> | ||
<li><a href="#">tables</a></li> | ||
<li><a href="#">photo</a></li> | ||
<li><a href="#">video</a></li> | ||
</ul> | ||
</nav> | ||
</header> | ||
</body> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,62 @@ | ||
body { | ||
margin: 0; | ||
font-family: "Roboto", sans-serif; | ||
font-weight: 400; | ||
font-style: normal; | ||
} | ||
|
||
.header { | ||
display: flex; | ||
width: 1200px; | ||
background-color: 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. The color value 'fff' is missing the '#' symbol. It should be '#fff' to correctly represent the white color in hexadecimal format. |
||
justify-content: space-between; | ||
|
||
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. There is a missing closing bracket '}' for the '.header' class. Ensure that each CSS rule set is properly closed to avoid unexpected behavior. |
||
.img { | ||
display: block; | ||
margin-left: 50px; | ||
margin-top: 10px; | ||
margin-bottom: 10px; | ||
} | ||
.nav { | ||
margin-right: 50px; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
a { | ||
text-decoration: none; | ||
color: black; | ||
} | ||
|
||
ul { | ||
display: flex; | ||
font-size: 12px; | ||
list-style: none; | ||
text-transform: uppercase; | ||
|
||
} | ||
li:not(:last-child) { | ||
margin-right: 20px; | ||
} | ||
} | ||
.blue { | ||
color: #00ACDC; | ||
} | ||
|
||
a:hover { | ||
color: #00ACDC; | ||
} | ||
.is-active { | ||
color: #00ACDC; | ||
position: relative; | ||
} | ||
.is-active::after { | ||
content: ""; | ||
position: absolute; | ||
left: 0; | ||
bottom: -22.5px; | ||
width: 100%; | ||
height: 4px; | ||
border-radius: 8px; | ||
background-color: b#00ACDC; | ||
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 color value 'b#00ACDC' is incorrect. It should be '#00ACDC' without the 'b' prefix to correctly represent the color in hexadecimal format. |
||
} |
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.
Consider using a relative URL for the logo image source to ensure it works correctly regardless of the server or domain where the HTML file is hosted. This will make the path more flexible and adaptable to different environments.