vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Does anyone know how to create an auto scroll away from the top: 0 post anchor point? (https://vborg.vbsupport.ru/showthread.php?t=317490)

edgeless 02-23-2015 11:07 PM

Does anyone know how to create an auto scroll away from the top: 0 post anchor point?
 
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 [DATE]1424754810[/DATE] at [TIME]1424754810[/TIME] ---------------

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

Quote:

Originally Posted by billstelling (Post 2538840)
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:
Code:

a[name] {
  padding-top: 50px;
  margin-top: -50px;
  display: inline-block; /* required for webkit browsers */
}

It works like a charm!


All times are GMT. The time now is 05:52 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02178 seconds
  • Memory Usage 1,720KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete