*, *:before, *:after { box-sizing: border-box; } body { font-family: 'Source Sans Pro', sans-serif; font-weight: 200; } h1, h2{ font-weight: normal; text-align: center; margin-right: auto; margin-left: auto; max-width: 30em; } [class*="flex-container"] { background: #001F3F; display: flex; justify-content: space-between; font-size: 1.5em; & > div { &:nth-of-type(2) { margin-left: -25%; width: 25%; } &:nth-of-type(3) { text-align: right; margin-right: -25%; width: 25%; } } a { color: #fff; display: inline-block; text-decoration: none; padding: 1em; transition: background-color 0.1s ease; &:hover { background: #0074D9; text-decoration: underline; } } } .flex-container-2 { & > div { &:nth-of-type(2) { margin-left: -20%; width: 20%; } &:nth-of-type(3) { text-align: right; margin-right: -20%; width: 20%; } &:nth-of-type(4) { text-align: right; margin-right: -20%; } } }