FANDOM


This Forum has been archived

Visit the new Forums
Forums: Index Help desk Scrollbox
FANDOM's forums are a place for the community to help other members.
To contact staff directly or to report bugs, please use Special:Contact.

50px-Replacement filing cabinet.svg

Note: This topic has been unedited for 4352 days. It is considered archived - the discussion is over. Do not add to unless it really needs a response.


I'd like to create a scrollbox template for The Hardy Boys Wiki, such as those on Wikipedia and the Inheritance Wiki. I'd like to change it a bit though - instead of a vertical scroll I'd like to change it to horizontal scroll. How do I do this?

Thanks,

WHLfan (talk to me!) 22:28, 29 August 2008 (UTC)

This code :
<div style="width:{{#if:{{{largeur|}}}|{{{largeur}}}|96%}};
height:{{#if:{{{hauteur|}}}|{{{hauteur}}}|auto}};
overflow:auto;">{{#if:{{{contenu|}}}|{{{contenu}}}|Le <contenu> sera placé ici.}}</div>
comes from a template on fr.guildwars and can be use to do both "type" of scrolling. If you prefer parameters names in english, here a translation :
<div style="width:{{#if:{{{width|}}}|{{{width}}}|96%}};
height:{{#if:{{{height|}}}|{{{height}}}|auto}};
overflow:auto;">{{#if:{{{content|}}}|{{{content}}}|The content would be place here.}}</div>
Scrolling occur in a direction only when the content is larger than the size specified for the boxe. If you set a width of say 200 px and the content is 500 px wide, horizontal scolling show up. If you set an height of 300 px and the content is only 250 px on the vertical, no vertical scrolling will be shown.
Content can be anything, even a <div> to restrict the placement of a list of images or another template. — TulipVorlax 02:49, 31 August 2008 (UTC)
Thanks a lot for your time TulipVorlax! Unfortunately, however that does not seem to work with images which is what a want this template for. As you can see on my sandbox.
WHLfan (talk to me!) 07:06, 31 August 2008 (UTC)
First of all, this code is intended to be used in a template; not directly in a page; secondly; i said you have to put images inside something that will limit their placement. All of this is easy to understand when we know standard HTML.
To use this on any page you put :
{{scrollbox
  |width=50%
  |height=160px
  |content=<div style="height:150px">[[Image:Wanted.jpg|80px]][[Image:Wanted.jpg|80px]]
[[Image:Wanted.jpg|80px]][[Image:Wanted.jpg|80px]][[Image:Wanted.jpg|80px]]</div>
}}
It work as i said with images on fr.guildwars, so except if the hardyboys wiki treat HTML and CSS diffrently, it should work the same there. — TulipVorlax 09:02, 31 August 2008 (UTC)
Here, see it in action :
WikiWikiWiki
Ok, after futher testing; the div around the content must have a larger width than the scrollbox. — TulipVorlax 09:18, 31 August 2008 (UTC)

Thanks for your help.

WHLfan (talk to me!) 22:00, 2 September 2008 (UTC)

Community content is available under CC-BY-SA unless otherwise noted.