Background stops when scrolling down #123404
-
BodyHi, I have a problem that when i scroll in my side panel the text continues but the dark blue background just stops, how do I fix that?
Guidelines
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi @LuComic If the text inside your side panel is longer than the height of the side panel itself, it will overflow and continue scrolling while the background remains fixed. To solve this issue, you can make the background of the side panel extend along with the content. here we go: .side-panel { .side-panel-expanded { /* Adjust the background color to fill the entire height of the side panel */ Also, in your HTML structure, wrap the content of your side panel with a container div with the class side-panel-content: Hope it solves your issue. |
Beta Was this translation helpful? Give feedback.
Hi @LuComic
If the text inside your side panel is longer than the height of the side panel itself, it will overflow and continue scrolling while the background remains fixed.
To solve this issue, you can make the background of the side panel extend along with the content.
here we go:
.side-panel {
background-color: #151426;
transition: width 0.5s ease;
padding: 20px;
overflow-y: auto; /* Add overflow-y property to enable scrolling */
}
.side-panel-expanded {
width: 45%; /* Expanded width */
flex-shrink: 0;
padding: 20px;
}
/* Adjust the background color to fill the entire height of the side panel */
.side-panel-content {
background-color: #151426;
}
Also, in your HTML structure, wrap the …