.imageBlock { position: fixed; z-index: -1; right: 0; left: 0; top: 0; bottom: 0; background-size: cover; background-position: center; min-height: 100%; background-attachment: fixed; } .block { background-color: rgba(13, 17, 23, 0.9); } .spacer { height: 5rem; }