user1473398
user1473398

Reputation: 21

CSS issue: How to prevent div moving out of position when scrolling

CSS newb here. I'm modifying the CSS of a blog template, but I've run into an issue where the divs containing the blog title/comments/tags will move out of their original position when scrolling down the page. I've tried many attempts to make it so that they'd always retain their original position, but I haven't been successful yet. Any input/suggestions would be greatly appreciated.

Thanks in advance!

Upvotes: 2

Views: 9141

Answers (3)

Cosmin Atanasiu
Cosmin Atanasiu

Reputation: 2654

Have you tried using the css property

position:fixed;

Upvotes: 1

Reno Dimitrova
Reno Dimitrova

Reputation: 192

I agree with @John B. The script changing the position to fixed is around line 105 in template.js

 $(activeProject+ " .project_rail").css({"position":"fixed","top":feedHeaderHeight});

Upvotes: 1

Rooster
Rooster

Reputation: 10077

theres some script on your page thats applying positon: fixed; to its parent div(.project-rail) when you scroll. if you change the class name that will stop the script action. Or you could remove the script. If you change the class name though you will have to reapply the style rules to the new class.

Upvotes: 0

Related Questions