.notification-bar { display: inline-block; z-index: 50; position: fixed; top: 0; left: 0; width: 100%; height: 2em; background-color: #00B4F5; box-shadow: #222 0px 0px 5px; transition: all 0.3s ease-in; } .notification-bar-text { font-family: 'Josefin Sans', sans-serif; text-transform: uppercase; text-align: center; color: #fff; padding: 0px 1em; height: 100%; line-height: 35px; font-size: 1em; font-weight: bold; text-align: center; } .notification-bar-close { font-family: 'Open Sans', sans-serif; display: inline-block; padding: 0px 1em; height: 100%; line-height: 2em; color: #fff; font-size: 1.5em; font-weight: bold; text-align: center; } .notification-bar-close:hover { color: #fff; } .notification-bar-close:focus { outline: none; } .notification-bar-close:active { color: #F5F6F6; } .notification-bar-close:hover { color: #F5F6F6; } .notification-bar-close:focus { outline: none; } .notification-toggler { position: absolute; right: 2px; top: 2px; background: transparent; border: none; cursor: pointer; outline: none; height: 2em; width: 2em; z-index: 50; transition: all 0.2s ease-in; } .cross-line { background: #222; box-shadow: #222 0px 0px 2px; position: absolute; height: 2px; left: 0; width: 100%; } #notification-toggler:hover .cross-line { background: #777; } .cross-line-top { top: 50%; transform: rotate(45deg) translatey(-50%); } .cross-line-bottom { bottom: 50%; transform: rotate(-45deg) translatey(50%); } /* move it further up the screen than the mobile toggler would */ .notification-toggled { transform: translatey(-300%); } @media (pointer:none), (pointer:coarse) { .notification-bar { height: 3.3em; } .notification-bar-text { padding-top: 10px; } .notification-toggler { position: absolute; right: 6px; top: 4px; background: transparent; border: none; cursor: pointer; outline: none; height: 3em; width: 3em; z-index: 50; transition: all 0.2s ease-in; } }