I am dynamically creating multiple divs inside a div. I want all these inner divs to avoid overflowing from the outer div. I have attached jsfiddle to reproduce the problem.
https://jsfiddle.net/t3jgdodm/1/
attaching CSS:
html,
body {
height: 100%;
}
#topDiv {
background-color: lightblue;
max-height: 100px;
width: 100%;
padding: 10px;
}
#insideDiv {
background-color: pink;
max-height: inherit;
overflow-y: auto;
}
I want all divs to be under single scroll. I am using multiple divs as each div represents a new entered keyword and the div will dynamically generate inside the outer div. I am ready to change the div element into other HTML element if the problem if due to div element.