Space Between Nav Items
CSS
Easy
2 views
Problem Description
Make a header with logo on left and menu on right.
Output Format
Print the HTML+CSS code in one block.
Constraints
Use justify-content: space-between.
Official Solution
<!doctype html>
<html lang='en'>
<head>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<title>meetcode</title>
<style>
header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid #eee; }
nav { display: flex; gap: 12px; }
a { text-decoration: none; color: #124; }
</style>
</head>
<body>
<header>
<strong>meetcode</strong>
<nav>
<a href='#'>Topics</a>
<a href='#'>Practice</a>
<a href='#'>Login</a>
</nav>
</header>
</body>
</html>
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!