So, I'm just trying to create a simple navigator, and I started playing with flexbox. Why doesn't align-content work here? I can make justify-content work, but I just can't vertically align it. Here is the code.
* { margin: 0; padding: 0; } #Navbar_Wrapper { } #Navbar { width: 100%; height: 300px; background: darkslategray; } #Navbar_Content_Wrapper { width: 100%; display: flex; list-style: none; justify-content: center; align-content: center; } #Navbar_Content_Wrapper li { display: inline-block; } #Navbar_Content_Wrapper a { color: white; font: 16px normal Arial; text-decoration: none; padding: 5px 10px 5px 0px; }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title></title> <link rel="stylesheet" type="text/css" href="CSS Files/Navbar.css"/> </head> <body> <section id="Navbar_Wrapper"> <div id="Navbar"> <div id="Navbar_Content_Wrapper"> <div id="#Navbar_Content_Left"> <ul> <li><a href="#" id="Navbar_Home">Home</a></li> <li><a href="#" id="Navbar_Forum">Forum</a></li> <li><a href="#" id="Navbar_Search">Search</a></li> <li><a href="#" id="Navbar_Contact">Contact</a></li> </ul> </div> </div> </div> </section> </body> </html>
Why does this not mean that my objects are upright? Please help me because I'm just completely at a dead end why this is not working. Although this is probably just something simple.
source share