Add a scrollbar to the <div> element. - HTML CSS CSS

HTML CSS examples for CSS:Quiz

Description

Add a scrollbar to the <div> element.

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<head>
<style>
div {<!--   ww w .  j a va2 s.co m-->
    background-color: #eee;
    width: 200px;
    height: 70px;
    border: 1px dotted black;
    overflow: scroll;
}
</style>
</head>
<body>

<div>
  <p>This is a test. This is a test. This is a test.</p>
  <p>This is a test. This is a test. This is a test.</p>
</div>

</body>
</html>

Related Tutorials