Hello world,
I am new here. So, my question maybe dumb. I want to create nav element with box as its parent.
<!DOCTYPE html>
<html>
<head>
<title>My title</title>
</head>
<body>
<nav>
<h1> Logo</h1>
<ul>
<li><a href="/">Home</a></li>
<li><a href="/about">About Us</a></li>
</ul>
</nav>
</body>
</html>
nav {
display: flex;
align-items: center;
justify-content: space-around;
}
nav > ul {
display: flex;
align-items: center;
justify-content: center;
list-style: none;
}
nav > ul > li {
padding: 1rem;
margin: 1rem;
}
nav > ul > li > a {
text-transform: capitalize;
text-decoration: none;
padding: 1rem;
color: #fff;
border-radius: 0.75rem;
}
I want something like this as design.