Could someone assist me in aligning a logo on the left and navigation menu on the right using HTML and CSS?
I envision it to look like the image displayed.
I have tried various approaches to adjust my CSS styling, but nothing seems to be working as intended.
Below are snippets of my HTML and CSS:
body
{
margin: 0;
padding: 0;
font-family: Hoefler Text;
background-color: rgb(233, 245, 248);
}
header{
margin: 3% 10% 3% 10%;
padding: 37px 161px;
align-items: center;
}
@media screen and { (max-width: 700px)}
.header {
width: auto;
float: none;
}
.main-nav{
font-family: Hoefler Text;
font-size: .8rem;
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: rgb(0, 0, 0);
}
.main-nav li { float: left;}
.main-nav li a {
display:block;
color:#ffffff;
text-align: center;
padding:10px 12px;
text-decoration: none;
}
.main-nav li:hover{
background: #ADD8E6;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>*</title>
<link rel="stylesheet" href="*">
<link rel="shortcut icon" href="*"type="image/jpg">
</head>
<body>
<nav class="header">
<a href='*' ><img src='*' alt='logo'/></a>
<ul class="main-nav">
<li><a href="*">Home</a></li>
<li><a href="*"> Education</a></li>
<li><a href="*"> Experience</a></li>
<li><a href="*">Projects</a></li>
<li><a href="*">Contact Me</a></li>
</ul>
</nav>
</body>
</html>