I
I
id56346gera2018-07-21 18:10:50
css
id56346gera, 2018-07-21 18:10:50

How to make on bootstrap 3 so that when the content scrolls, the left sitebar flies behind me?

Thanks for the help.
How to make it so that when the main content scrolls, the left sitebar also scrolls with me. But on mobile screens, the left sitebar is at the top level, and the content below it, so here it can be a snag that when you scroll the screen, the left sitebar will scroll and thereby cover the main content with its appearance. In theory, on mobile screens, it will have to be fixed at the top so that it does not scroll.
5b534cb65934a271733292.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrew, 2018-07-21
@KickeRockK

Wrap the side bar in some kind of block and make it for the desktop

.side-bar {
position: fixed;
left: 5vw;
width: 25vw;
}
.main-container {
width: 70vw;
}

and for mobile phones:
@media screen and (max-width: 768px) {
    .side-bar {
        position: relative;
        width: 100vw;
    }
.main-container {
width: 100vw;
}
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question