How to display text in a box with a scroll bar?

HTML is really much easier than it looks. Ok, let me re-state that: when publishing a blog, the groundwork is already done for us, we are left to play with the goodies: fiddling around with the text and images. And fiddling we do!

Someone asked me how to put a text within a scroll bar. Here we go:

your text goes here. Actually, you can include anything you want: a picture, text, video etc…

sunrise march 2007

Using scrollbars is an easy way to put a lot of information, which is not relevant to your actual text, within a limited space

The HTML code for the scroll bar above is:

<div style=”border:1px black solid; width:300px; height:50px; overflow:auto;padding-left: 4px; “>
your text goes here.
</div>

Using a div with scrollbars is an easy way to put a lot of information within a limited space, something you might typically want to do in a sidebar.

You can easily expand the divwith other features, bells and whistles.

Related Posts with Thumbnails

No comments yet to