#cookie-banner { position: fixed; bottom: 0; left: 10.5%; width: 79%; background: linear-gradient(45deg, #2196F3, #21CBF3); color: #fff; padding: 15px; box-sizing: border-box; border-radius: 5px; display: flex; justify-content: center; align-items: center; z-index: 10000; } #cookie-banner p { margin: 0; flex: 1; } #cookie-banner .close-btn { position: absolute; top: 8px; right: 12px; cursor: pointer; font-size: 18px; } @media (max-width: 767px) { #cookie-banner { width: 90%; left: 5%; padding: 10px; } } @media (min-width: 768px) and (max-width: 1023px) { #cookie-banner { width: 85%; left: 7.5%; } }