CSS
div { height: 100px; overflow: auto; }
jsFiddle .
You specify an explicit height so that the div does not expand to fit its contents.
If you only need horizontal or vertical scrolling, use overflow-x and overflow-y respectively.
If you want additional content to be hidden on the track, use overflow: hidden .
By default, the overflow property is visible .
source share