0

How can i code a scrollable div ? perfectly with a blue border.

Is there a way to code this?

Like a window in a window -> two scrollbars

Johannes
  • 64,305
  • 18
  • 73
  • 130

2 Answers2

0

I don't know the id of your div but mine is box.

Add this to your code:

#box {
    width: 1620px;
    margin-right: auto;
    margin-top: 20px;
    background-color: white;
    box-shadow: #254C58 1px 0px;
    border: #3C7D91 5px double; 
    padding: 10px 10px 10px 10px;
    overflow-y: scroll;
    max-height: 433px;
}
Max Roncace
  • 1,277
  • 2
  • 15
  • 40
Shalomi90
  • 736
  • 4
  • 9
  • 33
0

If you want to scroll horizontally, add overflow-x:scroll to your CSS and when your div expands past its defined width it will become scrollable.

Inversely, overflow-y:scroll should be added to allow vertical scrolling as well under the same circumstances.

shaun
  • 1,017
  • 11
  • 22