PDA

View Full Version : Does anyone know how to create an auto scroll away from the top: 0 post anchor point?


edgeless
02-23-2015, 11:07 PM
I need every top: 0 post anchor load event to land at a slightly higher point on the page (so the post head ends up further below the browser window top). Stated another way, I need the top edge (anchor point at the post head) of each requested post to land 50 to 60 pixels lower than the very top of the browser window. How can I achieve this?

--------------- Added 1424754810 at 1424754810 ---------------

EDIT: I figured out that I can add some colorless, borderless padding to the top of postbit_legacy... which then makes the top of the padding area become the post anchor point. While that works, it obviously adds significant space between the posts in each thread. And also, for some reason the post number links and their respective check boxes on the right move up into the padding, while the timestamps remain down on the post head bar where they were. So I'll have to try and figure out how to move the numbers and boxes back down onto the head bar area.

There must be a better, more efficient way to implement the anchor relocation that I'm after. I'm still hopeful that someone knows of a good way to do it and will reply here.

edgeless
02-25-2015, 08:36 PM
I know that no one responded here. But I just thought I would submit this follow-up to state that I've found a perfect solution. It's a CSS solution and it results in no post heads appearing expanded, no extra distance between posts within threads, a completely adjustable landing point from the anchor position... and finally, the post anchor links and inline mod check boxes (the nodecontrols items) remain exactly where they should be. As such, I just wanted to make sure that no one who happens to see this thread a bit late goes to the trouble of posting any ideas. The matter is resolved.

billstelling
02-26-2015, 05:09 AM
Well, post up what you came up with. Could be useful to others here. I would love to check out what you did.

edgeless
02-26-2015, 06:24 AM
Well, post up what you came up with. Could be useful to others here. I would love to check out what you did.Here you go:
a[name] {
padding-top: 50px;
margin-top: -50px;
display: inline-block; /* required for webkit browsers */
}It works like a charm!