.container { position: absolute; width: 100%; height: 100%; text-align: center; top: 40%; left: 0; margin: 0 auto; p { font-size: 18px; } a { display: inline-block; position: relative; text-align: center; color: #FF5252; text-decoration: none; font-size: 18px; overflow: hidden; top: 5px; } a:after { content: ''; position: absolute; background: #FF5252; height: 2px; width: 0%; transform: translateX(-50%); left: 50%; bottom: 0; transition: .35s ease; } .a:hover:after, a:focus:after, a:active:after { width: 100%; } } #hero{ .button_container { position: absolute; top: 40px; right: 30px; height: 23px; width: 32px; cursor: pointer; z-index: 100; transition: opacity .25s ease; &:hover { opacity: .7; } span { background: $white; border: none; height: 4px; width: 100%; position: absolute; top: 0; left: 0; transition: all .35s ease; cursor: pointer; } span:nth-of-type(2) { top: 8px; } span:nth-of-type(3) { top: 16px; } } .button_container.active .top { transform: translateY(8px) translateX(0) rotate(45deg); background: $white; } .button_container.active .middle { opacity: 0; background: $white; } .button_container.active .bottom { transform: translateY(-8px) translateX(0) rotate(-45deg); background: $white; } } .button_container { position: absolute; top: 30px; right: 30px; height: 23px; width: 32px; cursor: pointer; z-index: 100; transition: opacity .25s ease; &:hover { opacity: .7; } span { background: $blue; border: none; height: 4px; width: 100%; position: absolute; top: 0; left: 0; transition: all .35s ease; cursor: pointer; } span:nth-of-type(2) { top: 8px; } span:nth-of-type(3) { top: 16px; } } .button_container.active .top { transform: translateY(8px) translateX(0) rotate(45deg); background: $blue; } .button_container.active .middle { opacity: 0; background: $blue; } .button_container.active .bottom { transform: translateY(-8px) translateX(0) rotate(-45deg); background: $blue; } .overlay { position: fixed; background: $black; top: 0; left: 0; width: 100%; height: 0%; opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s, height .35s; overflow: hidden; .logo { width: 180px; height: auto; top: 30px; left: 30px; position: absolute; } nav { position: relative; height: 70%; top: 50%; transform: translateY(-50%); font-size: 36px; font-weight: 200; text-align: center; } ul { list-style: none; padding: 0; margin: 0 auto; margin-top: 0px; display: inline-block; position: relative; height: 50%; li { display: block; height: 16%; height: calc(100% / 6); min-height: 50px; position: relative; opacity: 0; } a { display: block; position: relative; color: $white; text-decoration: none; overflow: hidden; padding-bottom: 15px; padding-top: 5px; } a:hover:after, a:focus:after, a:active:after { width: 100%; } } .sign-up-btn { border: none; padding: 30px; color: $green !important; &:hover { background: none !important; color: $green !important; } } } .overlay.open { opacity: 1; visibility: visible; height: 100%; li { animation: fadeInRight .5s ease forwards; animation-delay: .35s; } li:nth-of-type(2) { animation-delay: .4s; } li:nth-of-type(3) { animation-delay: .45s; } li:nth-of-type(4) { animation-delay: .50s; } } @keyframes fadeInRight { 0% { opacity: 0; left: 20%; } 100% { opacity: 1; left: 0; } }