FREE HTML CODE
Search HTML Code

HTML Scroll Box

An HTML scroll box is a box that grows scroll bars when it's contents are too large to fit in the box. How do you make the box? You create the box using the HTML div tag. Then, to make the box scroll, you apply the CSS overflow property to the div.

But, you don't need to worry about the technical details if you don't want to. You can simply copy and paste the HTML scroll box code below. Of course, you can change the values to suit (such as the size of the scroll box, color etc)


Basic HTML Scroll Box

HTML code:



Result:
As you can see, once there's enough text in this box, the box will grow scroll bars... that's why we call it a scroll box! You could also place an image into the scroll box.

Colored Scroll Boxes

Here's an example of an HTML scroll box with color added. You have a number of options when it comes to adding color to your scroll box. Click on the link to add color to your scroll boxes!



This HTML scroll box has had color added. You can add color to the background of your scroll box. You can also add color to the scroll bars.

Change the color of your scroll box!

Scroll Box with Images

You can also add images to your scroll box. This can be either a background image, or, one or more foreground images. Click on the link to add images to your scroll box!



Sample picture for scroll box: Milford Sound, New Zealand

Add an image to your scroll box!

Scroll Box Borders


Here's an example of an HTML scroll box with a border added. Click on the link to add a border to your scroll box!

This scroll box has had a border added to it. You can add borders to anything in HTML - including scroll boxes.

Add a border to your scroll box!


Horizontal Scroll

Here's an example of an HTML scroll box with a horizontal scroll only. Click on the link to add horizontal scrolling to your scroll box!

By using overflow-x, we can create scroll bars when the contents of this div are wider than the container. By setting this paragraph to 200 percent, it is 200 percent wider than the parent container - forcing an overflow.

Add horizontal scrolling to your scroll box!
| More