nav.list { display:flex; flex-direction: row; flex-wrap: wrap; margin-left: 3em; align-content: flex-start; align-items: flex-start; width: 100%; h1 { width: 100%; font-size: 2.5em; color: $color-secondary; } a { width: 32em; margin-bottom: 1em; margin-right: 1em; color: inherit; text-decoration: none; transition: all 0.5s ease-in; text-align: center; h2 { font-size: 1.5em; } &:hover { .header { background-color: $color-primary; } .header::after { border-color: $color-primary transparent transparent transparent; } } .header { transition: all 0.5s ease-in; padding: 1em; background-color: $color-bg-secondary; display: flex; flex-wrap: wrap; justify-content: center; position: relative; &::after { transition: all 0.5s ease-in; content: ""; width: 0; height: 0; border-width: $size-arrow; border-style: solid; border-color: #193441 transparent transparent transparent; position: absolute; bottom: -($size-arrow*1.8); /* Indented just a tiny bit in the post to avoid 1px wide gaps */ left: 0px; right: 0px; margin-left: auto; margin-right: auto; } > * { width: 100%; } } img { width: 100%; max-height: 256px; object-fit: cover; } } }