ul { list-style-type: none; margin: 0; padding: 0; overflow: hidden; background-color: #333; height: auto; width: 800px; position: absolute; top: 5%; } li { float: left; border-right:1px solid #bbbbbb; } li:last-child { border-right: none; } li a { display: block; color: white; text-align: center; padding: 14px 16px; text-decoration: none; } li a:hover:not(.active) { background-color: #111; } .active { background-color: #4CAF50; } #gameTable{ position: absolute; transform: translate(-50%, -50%); left: 50%; top: 50%; background-color: #ffffff; } .game{ border: solid black 0.1rem; border-collapse: collapse; font-size: 2rem; } .fields{ width: 3rem; height: 3rem; } body{ text-align: center; justify-content: center; background-color: #585858; display: flex; flex-direction: row; justify-content: center; }