As I create a lyrics sheet with chords, I'm facing an issue. Placing the chord (as a span) inside a word for precise positioning causes the word to split in half when the line wraps. How can I prevent this from happening?
https://i.sstatic.net/GlNYb.png
Check out the fiddle: https://jsfiddle.net/96h8kfw9/
Here is the code:
.chord {
display: inline-block;
height: 34px;
width: 0px;
color: blue;
white-space: pre;
}
.line {
min-height: 12px;
width: 285px;
}
.line-text {
vertical-align: bottom;
white-space: pre-wrap;
}
HTML
<div class="line">
<span class="line-text">
Hello this is a line that wraps with a brok<span class="chord">C#</span>en word.
</span>
</div>
edit: I do want wrapping, but I'd like the entire word to stay intact instead of breaking it in half.