I have the following HTML and CSS:
<style>
.field { display: inline-block; width: 100px; overflow: hidden; white-space: nowrap; margin-left: 15px; }
.field:hover { overflow: visible; z-index: 100; }
</style>
<span style="display: block; white-space: nowrap;">
<span class="field"> field 1 - Some long text in here that gets cut off.</span>
<span class="field"> field 2 - Some long text in here that gets cut off.</span>
</span>
Preview: http://jsfiddle.net/RpLQk/
If you hover over field 1, the overflow text is shown, but since the background-color is transparent the text of field 2 bleeds through, and it looks terrible. I need field 1 to cover field 2 during hover.
I've tried setting the background-color, but the color is only applied to the original element size, not the newly displayed overflow. I've tried z-index: 1000 and position: relative, to no avail.
Also, I need this to work in IE 9.
Any help is appreciated.