I have something like the following:
<div style="float: left; height: 20px; overflow-y: scroll">
<div>hello this is a test</div>
<div>hello this is another test</div>
<div>t1</div>
<div>t2</div>
<div>t3</div>
</div>
The parent div grows to the appropriate width to fit the largest child (which is exactly what I want). However, the vertical scroll bar causes the inner width to be smaller, which causes the largest child to wrap.
Is there a way to make a parent grow to the width of the largest child + the width of the scroll bar? I tried every marker trick that I know, but nothing.
source
share