vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Sideblock scrollbars (https://vborg.vbsupport.ru/showthread.php?t=264131)

RobDog888 05-24-2011 03:03 PM

Sideblock scrollbars
 
I want to have one of my sideblocks list many items but dont want it to be a whole page tall lol. So Im sure it has to be done with a DIV and an overflow or something. Anyone know the code?

Thanks

Lynne 05-24-2011 03:37 PM

The sideblock should just be the height that is needed to display what you want. Why not make sure you are only spitting out xx amount of content and then you don't have to worry about scrollbars. But, if you want a scrollbar, then yes, it is the overflow property for the div - http://www.w3schools.com/Css/pr_pos_overflow.asp

RobDog888 05-24-2011 03:44 PM

Thanks Lynne but members want to see like 10+ New Forum Posts and its too long. How could I force it to 5 posts high but contain 10-20 posts?

There is no code for the default New Forum Posts block

Lynne 05-24-2011 03:49 PM

Then modify the template? Or, create your own template and use it instead?

RobDog888 05-24-2011 04:07 PM

Do I modify the content_container one?

--------------- Added [DATE]1306298037[/DATE] at [TIME]1306298037[/TIME] ---------------

Got it. Modified the template for new posts and inserted a div with the auto setting for overflow so it only shows th scrollbar when needed

Code:

<div class="widget_content blockbody floatcontainer">
<div style="height: 325px; overflow: auto;">

--------------- Added [DATE]1306301969[/DATE] at [TIME]1306301969[/TIME] ---------------

Made it cleaner with these template edits:

Code:

block_newposts:

<div class="widget_content blockbody floatcontainer sidebarsidescrollbar">


additional.css:
/* SIDEBAR SCROLLBAR FOR LIMITING THE HEIGHT TO 300PX */
.sidebarsidescrollbar {
  height: 300px;
  overflow: scroll;
}



All times are GMT. The time now is 10:01 PM.

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.01132 seconds
  • Memory Usage 1,718KB
  • 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
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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