Toggle navigation
☰
HTML
CSS
Scripting
Database
<!DOCTYPE html> <html> <head> <title>Flexbox Sidebar Menu Example</title> <style> body { font-family: sans-serif; margin: 0; } .container { display: flex; min-height: 100vh; } .sidebar { width: 200px; background-color: #2c3e50; color: white; padding-top: 20px; } .sidebar a { padding: 10px 15px; text-decoration: none; font-size: 18px; color: #bdc3c7; display: block; } .sidebar a:hover { color: #fff; background-color: #34495e; } .main { flex-grow: 1; padding: 20px; background-color: #f4f4f4; } </style> </head> <body> <div class="container"> <nav class="sidebar"> <a href="#">Home</a> <a href="#">Services</a> <a href="#">Clients</a> <a href="#">Contact</a> </nav> <div class="main"> <h2>Main Content</h2> <p>This layout uses Flexbox to place the sidebar and main content side-by-side. The <code>flex-grow: 1</code> property ensures the main content area fills the remaining space.</p> </div> </div> </body> </html>