Adding scrollbars to the contents of the tag div

To execute the example, the tag HEAD must include links to the PP.js library and to the PP.css visual style table. Add an area that contains scrollbars to the HTML page:

<body>

<!--Position the ScrollBox component and specify its parameters-->

<div id="scrollholder1">

<!--Place a text area inside the ScrollBox component and specify its size-->

        <div style='width: 300px; height: 700px'>

            <b>ScrollBox in DIV</b><br/>

            But I must explain to you how all this mistaken idea of denouncing pleasure and

            praising pain was born and I will give you a complete account of the system, and

            expound the actual teachings of the great explorer of the truth, the master-builder

            of human happiness. No one rejects, dislikes, or avoids pleasure itself, because

            it is pleasure, but because those who do not know how to pursue pleasure rationally

            encounter consequences that are extremely painful. Nor again is there anyone who

            loves or pursues or desires to obtain pain of itself, because it is pain, but because

            occasionally circumstances occur in which toil and pain can procure him some great

            pleasure.

        </div>

</div>

    <script type="text/javascript">

        var ScrBox= new PP.Ui.ScrollBox({//Create the ScrollBox component

            ParentNode: document.body,

            Content: document.getElementById("scrollholder1"),

            Width: 258,

            Height: 355

        });

    </script>

</body>

After executing the example a text are with scrollbars is displayed on the HTML page:

See also:

ScrollBox