Full Height Sidebar Layout
CSS
Hard
3 views
Problem Description
Make a full height layout with sidebar and main using flex and 100vh.
Output Format
Print the HTML+CSS code in one block.
Constraints
Use min-height: 100vh and stretch columns.
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>
body { margin: 0; font-family: system-ui, Arial, sans-serif; }
.layout { min-height: 100vh; display: flex; }
aside { width: 220px; background: #0b1220; color: #fff; padding: 16px; }
main { flex: 1; padding: 16px; }
</style>
</head>
<body>
<div class='layout'>
<aside>meetcode menu</aside>
<main>
<h1>Topics</h1>
<p>Pick one and practice.</p>
</main>
</div>
</body>
</html>
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!