Toggle navigation
☰
HTML
CSS
Scripting
Database
<!DOCTYPE html> <html> <head> <style> .flex-container { display: flex; justify-content: center; align-items: center; height: 300px; border: 1px solid #ccc; background-color: #f9f9f9; } .child { background-color: #ff9; padding: 20px; border: 1px solid #ff0; text-align: center; } </style> </head> <body> <div class="flex-container"> <div class="child"> Look! This is perfectly centered both vertically and horizontally using Flexbox! </div> </div> </body> </html>