Answer the question
In order to leave comments, you need to log in
How to make a dialogue scroll like in VK?
How to make a dialogue scroll like in VK?
Scroll the dialog so that it is displayed as the main one, and not inside the blog posts.
In addition to overlapping a block with another block via fixed
Answer the question
In order to leave comments, you need to log in
If you are too lazy to read - an example , and only the content scrolls on the dialog page, because the sidebar and header blocks receive . Here is the rule for this:
That is, you want to make it so that only the dialog block scrolls when scrolling, right?
If I understood the question correctly, then tell me what your phrase "Except for overlapping a block with another block through fixed" means? That won't work) Because the visual part of vk.com is designed using fixed: there is a main block of fixed width, inside it is a content block, which is compressed from the left and top by one sidebar block and several header blocks. The behavior of these blocks is regulated by the class .im_fixed_nav
, which is hung on the body element: on normal pages, for example, the user's page, the content scrolls along with the sidebar and header, because these blocks have the default propertyposition: relative;
position: fixed;
.im_fixed_nav #page_header, .im_fixed_nav #side_bar {
position: fixed;
}
body
div.scroll-fix-wrap
div.scroll-fix
div.page-layout {
div.header
div.sidebar
div.content
}
Using https://github.com/flesler/jquery.scrollTo
We accept an element and scroll to it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question