If I give all the children of an element white-space: nowrap, the space does not break between the elements, where it should be in webkit (and blink):
jsfiddle.net/VJyn2
.pairs {
width: 180px;
overflow: hidden;
}
.pairs > span {
white-space: nowrap;
}
<div class="pairs">
<span>
<strong>bread:</strong>
<em>crust</em>
</span>
<span>
<strong>watermelon:</strong>
<em>rind</em>
</span>
...
</div>
The intent of CSS is to keep pairs of words together, but to allow text breaks between elements <span>. This works in both IE and FireFox.

But in browsers based on Webkit (safari, chrome, opera), instead of overlaying too long a gap on the next line, the range is cut off.

This is a bug in webkit (and blinking), right? Is there a workaround?
source
share