Scroll block with page in drupal
-
02-10-2019 - |
Question
Is it possible that if i scroll down on drupal the block should also scroll along with the page. Because i have to display long results on the node and i want to scroll the block so that user can see the data on left sidebar everytime.
Solution
If you don't need it to be animated, you can simply use the "position: fixed" CSS attribute.
Assuming your block is 10px from the left, and 50px from the top it would look something like this:
HTML
<div class="scrolling-block">
I can see you!
</div>
CSS
.scrolling-block {
position: fixed;
left: 10px;
top: 50px;
}
Also, check this out. http://www.cssplay.co.uk/layouts/fixed.html
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow