body { min-height: 100vh; padding-top: 56px; } .navbar { z-index: 1030; /* Ensure the navbar is above other elements */ } .sidebar { height: calc(100vh - 56px); /* 56px is the height of the navbar */ position: fixed; top: 56px; /* Offset by the navbar height */ left: 0; width: 250px; background-color: #343a40; color: white; z-index: 1020; /* Lower than navbar to stay behind it */ transition: transform 0.3s ease-in-out; overflow-y: auto; /* Make sidebar scrollable */ } .sidebar .navbar-nav .nav-item .active { font-weight: bold; } .sidebar.minimized { transform: translateX(-100%); } .content { margin-left: 250px; padding-bottom: 20px; transition: margin-left 0.3s ease-in-out; } .content.full-width { margin-left: 0; } .footer { background-color: #f8f9fa; padding-top: 5px; text-align: center; margin-left: 250px; transition: margin-left 0.3s ease-in-out; z-index: 1010; } .footer.full-width { margin-left: 0; } .profile-image { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; } .sidebar-toggle { position: fixed; bottom: 20px; left: 20px; background-color: #343a40; color: white; border: none; width: 100px; height: 40px; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 1040; /* Above the sidebar and navbar */ padding: 5px; border-radius: 8px; /* Rounded corners */ } .sidebar-toggle span { margin-left: 5px; } @media (max-width: 768px) { .sidebar { transform: translateX(-100%); } .sidebar.show { transform: translateX(0); } .content { margin-left: 0; } .footer { width: 100%; margin-left: 0; } }