Classic Black And White Mega Menu - MeggiTools
Run
Toggle Theme
Share Link
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Classic Black and White Mega Menu</title> <style> body { font-family: 'Arial', sans-serif; margin: 0; padding: 0; background: #ffffff; } nav { background: #000000; color: #ffffff; padding: 10px 0; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); } .menu-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; } .menu { display: flex; list-style: none; padding: 0; margin: 0; } .menu li { position: relative; margin: 0 15px; } .menu > li > a { text-decoration: none; color: #ffffff; padding: 10px 15px; display: block; transition: background 0.3s; } .menu > li:hover > a { background: #333333; } .mega-menu { position: absolute; left: 0; top: 100%; background: #f9f9f9; color: #333; display: none; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); padding: 20px; z-index: 10; animation: fadeIn 0.5s ease-in-out; white-space: nowrap; } .menu > li:hover .mega-menu { display: flex; } .mega-menu-column { padding: 10px; } .mega-menu-column h4 { margin-top: 0; } .mega-menu-column a { display: block; text-decoration: none; color: #000000; padding: 5px 0; transition: color 0.3s; } .mega-menu-column a:hover { color: #555555; } @keyframes fadeIn { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } } /* Custom emoji and icon styles */ .menu a::before { content: "⬛ "; } .mega-menu-column a::before { content: "⚪ "; } /* Responsive styles */ @media (max-width: 768px) { .menu-container { flex-direction: column; align-items: flex-start; } .menu { flex-direction: column; width: 100%; } .menu li { width: 100%; } .menu > li > a { width: 100%; } .mega-menu { position: static; width: 100%; } .mega-menu-column { width: 100%; } } </style> </head> <body> <nav> <div class="menu-container"> <ul class="menu"> <li> <a href="#">Home</a> </li> <li> <a href="#">Services</a> <div class="mega-menu"> <div class="mega-menu-column"> <h4>Consulting</h4> <a href="#">Business</a> <a href="#">Technology</a> <a href="#">Strategy</a> </div> <div class="mega-menu-column"> <h4>Support</h4> <a href="#">Customer Service</a> <a href="#">Technical Support</a> <a href="#">FAQ</a> </div> <div class="mega-menu-column"> <h4>Training</h4> <a href="#">Workshops</a> <a href="#">Webinars</a> <a href="#">Certifications</a> </div> </div> </li> <li> <a href="#">Projects</a> <div class="mega-menu"> <div class="mega-menu-column"> <h4>Current</h4> <a href="#">Project A</a> <a href="#">Project B</a> <a href="#">Project C</a> </div> <div class="mega-menu-column"> <h4>Completed</h4> <a href="#">Project D</a> <a href="#">Project E</a> <a href="#">Project F</a> </div> <div class="mega-menu-column"> <h4>Upcoming</h4> <a href="#">Project G</a> <a href="#">Project H</a> <a href="#">Project I</a> </div> </div> </li> <li> <a href="#">Contact</a> </li> </ul> </div> </nav> </body> </html>