Toggle navigation
☰
HTML
CSS
Scripting
Database
<!DOCTYPE html> <html> <head> <title>Flexbox Navigation Bar Example</title> <style> nav { font-family: Arial, Helvetica, sans-serif; background-color: #2c3e50; padding: 1rem; } nav ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; /* Centering the items */ } nav li { margin: 0 15px; } nav a { color: white; text-decoration: none; font-weight: bold; } nav a:hover { color: #3498db; } </style> </head> <body> <nav> <ul> <li><a href="#">Home</a></li> <li><a href="#">Services</a></li> <li><a href="#">Portfolio</a></li> <li><a href="#">Contact</a></li> </ul> </nav> </body> </html>