There seems to be a similar question to this, and it was resolved by adding padding-right. However, in my case, that won't work because I don't know the width for any of my div until contents are rendered at run time via ajax call. I have something similar to this
Assuming below pseudocodes are syntactically correct.
<div id="parent">
<div id="child1"> Lots of contents </div>
<div id="child2"> Lots of contents </div>
</div>
#parent {
overflow: auto;
max-width: 600px;
}
#child1 , #child2 {
display: inline-block;
max-width: 300px;
}