CSS Property Value How to - overflow: scroll; show the scroll bar








Question

We would like to know how to overflow: scroll; show the scroll bar.

Answer


<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
div {<!--from   w  w w  .j  a va2 s. c om-->
  float: left;
  width: 278px;
  height: 50px;
  margin: 10px;
  display: block;
  border: 1px solid red;
  overflow: scroll;
}
</style>
</head>
<body>
  <div>
    Hello<br />Hello
  </div>
  <div>
    Hello<br />
    <br />Hello
  </div>
  <div>
    Hello<br />
    <br />
    <br />Hello
  </div>
  <div>
    Hello<br />
    <br />
    <br />
    <br />Hello
  </div>
  <div>
    Hello<br />
    <br />
    <br />
    <br />
    <br />Hello
  </div>
</body>
</html>

The code above is rendered as follows: