Introduction
You can create scrolling boxes with WikiText, and with HTML and CSS as well using the "overflow:auto;" attribute. Scrolling boxes are mainly for lists or sections of a page. The way this works is you create a box, and as you type the box will create scroll bars so that all the text fits.
Here is an example of it:
- The coding for a vertical scroll box:
<center><div style="border:black 4px solid;width:200px;height:100px;overflow:auto;">Text goes here. Just fill up the box!</div></center>
- The coding for a horizontal scroll box:
<div style="overflow: scroll; height: 50px; width: 540px; border: 4px none; margin-center: 0px; border-radius: 0px;color:none;overflow-y: hidden">
NOTE: The above code often glitches in WikiText. However, it still works in HTML.
Scrolling boxes are great for columns, because the width and height adjustments give the columns a certain size, keeping them from overflowing.
You can also put images and GIFs in scrolling boxes, like below:
The code for this:
<center><div style="border:black 4px solid;width:200px;height:150px;overflow:auto;">[[File:Forest1.PNG|200px]]</div></center>
Additionally, those images can be linked, with a border or caption, etc.! Go to Image Modification to learn how.
Adding Attributes
You can also add backgrounds to scrolling boxes by adding this to your scrolling box:
background: *insert color here*;
Like this:
You can also change the font color by adding this to your code:
color: *insert color here*;
Like shown above!
To add a cool font shadow, you can add this:
text-shadow: insert 0px 3px 3px;
Example:
You can also change the background to a gradient, like this:
background: linear-gradient(to right, color, color);
Example:
To change the font, you can just add this:
font-family: *insert font name here*;
Example:
It has to be the fonts that the wiki enabled, otherwise it would not work.
To change the border, you can just add this:
border: *insert border styling here*
Example:
By adding all shown above, you can get this!
<div style="border:3px double pink;border-radius:5px;background: linear-gradient(to right, purple, blue); color: white; overflow:hidden;width:432px;overflow:scroll;width:200px;height:100px;overflow:auto;font-family: Indie flower;text-shadow: white 0px 3px 3px">With all the codes combined, you can add more and more cool coding! This sentence will continue to fill up the box.<br>This sentence will continue to fill up the box.<br>This sentence will continue to fill up the box.<br>This sentence will continue to fill up the box.<br></div>
You can add many more attributes to your scrollbox!