Does the CSS property overflow apply to divs, or is there a list of other HTML elements that support this property?
I tried to use:
<span style="overflow:auto;"><img src="hs.gif" alt="Horizontal Scroll"></span>
But it doesn’t seem to apply an horizontal scroll bar when the contents are partially hidden, as in the case of a div.
It works on most* elements; the problem is that your
<span>expands to contain your image. (What width would it need for there to be a scrollbar?) Give it a width (and to do that, it can’t be inline, either; the default for<span>s):And now it works.
* most: block-level elements, table cells, inline-table and inline-block elements. Documentation here.