9.3 Student Activity
Build a Responsive Navigation Bar Using Flexbox
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <link rel="stylesheet" href="basic.css" /> <link rel="stylesheet" href="index.css" /> <style> body { font-family: Arial, sans-serif; } @media screen and (max-width: 600px) { .container { flex-direction: column; gap: 10px; } } </style> <title>Document</title> </head> <body> <div class="container"> <div class="logo">My Logo</div> <div class="home">Home</div> <div class="about">About</div> <div class="contact">Contact</div> </div> </body> </html>
Last updated