html, body { height: 100%; margin: 0; } body { display: flex; flex-direction: column; } main { flex: 1; display: flex; flex-direction: column; justify-content: flex-start; align-items: center; padding-top: 7%; } .fixed { -ms-flex: 0 0 300px; flex: 0 0 300px; min-width: 300px; } .hover-effect { transition: opacity 0.3s ease; } .hover-effect:hover { opacity: 0.8; } .theme-toggle { position: fixed; top: 20px; right: 20px; z-index: 1000; } .theme-light .dark-logo { display: none; } .theme-dark .light-logo { display: none; }