/* HORIZONTAL MENU */ body, header h1 { margin: 0; } header { background: #ccc; padding: 0.25em; text-align: center; } nav { display: flex; justify-content: center; background: #333; } nav a { padding: 1.25em 1.5em; color: #ccc; background: #555; text-decoration: none; transition: all 1.5s; } nav a:hover { color: #dfd; background: #797; } main { padding: 0 10px; } /* VERTICAL MENU */ /* simply uncomment the style blocks below to override the CSS above. 'float' isn't ideal for layout, but works okay with two elements */ /* nav { flex-direction: column; width: 15%; float: left; } main { width: 85%; float: right; box-sizing: border-box; } */