html - Why does an overflow:auto scrollbar take width out of my div? -
i have absolutely positioned div
, overflow:auto
.
when overflows vertically, vertical scrollbar appears. appears within div
(even though isn't fixed width), shrinks space available div's contents. in case, causes text wrap unnecessarily, undesirable.
see https://jsfiddle.net/hktgcrj0/ - shrink page until div
overflows , scroll bar appears - see text wrap.
is there way make scrollbar appear outside of div
, or increase width of div
accommodate scroll bar?
note application (the fiddle massively simplified) giving div fixed width not option, , disabling text wrapping not option.
try adding:
div { white-space: nowrap; }
or wrap inner elements in <p>
tags , apply white-space: nowrap;
that.
Comments
Post a Comment